the Forums » NetAdvantage for Windows Forms » AppStylist for Windows Forms is missing the "Write a New Post" button under the big Search bar
http://es.infragistics.com/community/forums/173.aspx
can isl file properties be changed programically ? without changing the file its self? i am reffering to the ResolutionOrder specifically = ControlThenApplication
like :
..... = Infragistics.Win.AppStyling.ResolutionOrder.ControlThenApplication;
i found an older post here :
http://es.infragistics.com/community/forums/p/11150/42339.aspx
and i was wondering if this task can be done by the avrage developer ? :) without the need to install the " AppStylist Runtime component"
somehow i didn't get email reporting that i got a reply.
Thanks Mike !! exactly what i needed !
Yes, it is possible to change the properties of the isl in memory without necessarily affecting the isl file itself. It's a bit tricky, though, and there's not a lot of documentation on it, since it's such an unusual thing to do.
If you want to change the resolution order for one particular control, (such as UltraButton) you could do something like this:
ApplicationStyleLibrary styleLibrary = new ApplicationStyleLibrary(); styleLibrary.LoadFromStyleManager(); StyleSetSettings styleSet = null; if (styleLibrary.StyleSets.Count > 0 && styleLibrary.DefaultStyleSet != null) styleSet = styleLibrary.StyleSets[styleLibrary.DefaultStyleSet]; if (styleSet == null) { styleSet = styleLibrary.StyleSets.Add("Default"); styleLibrary.DefaultStyleSet = styleSet.Key; } ComponentStyleSettings ultraButtonComponentRole = styleSet.ComponentStyles.GetComponentStyle("UltraButton", true); ultraButtonComponentRole.ButtonStyle = Infragistics.Win.UIElementButtonStyle.Flat; ultraButtonComponentRole.ResolutionOrder = ResolutionOrder.ControlOnly; styleLibrary.UpdateStyleManager();
To affect "All Components", the properties are directly on the styleSet object itself:
styleSet.ResolutionOrder = ResolutionOrder.ControlThenApplication;