Hello Guys,
We ve been developing windows application in .Net 2005 using infragistics components vol 3. We ve created own style, i want to apply those style programmatically to my application.Is that possible to apply via programmatically.
Thanks in Adavance
Maguesh
Hi, you have to to call the Load method of the Stylemanager to load a style library:
static void Main() {Infragistics.Win.AppStyling.StyleManager.Load("StyleLibrary.isl");Application.Run(new Form1());}
new
In order to change the assigned Library for a control at runtime, you have to set the StyleSetName property:
this.ultraMonthViewSingle.StyleSetName = "StyleSetBlue";
You can find further information on that topic <a href="http://help.infragistics.com/Help/NetAdvantage/NET/2007.3/CLR2.0/html/Win_Loading_a_StyleLibrary.html">here</a>
What about if you just want to change the look of a certain control on a page? Say I wanted all warnings in the application to be red text and bold. How could that be implemented using appstylist and infragistics control? I tried to create a new style set and apply it to a label, but it appeared to apply the style to the entire page.
Thanks in advance!Amie
Hi Amie,
are you taling about AppStylist for Windows Forms or for Web Forms?
Did you set up "copy always" property?
that's all i've ever had to do...sorry
well actually first i was testing some Microsoft components.. as windows form components (button, textBox, Calendar) and it didnt work..
then i tried to put in the form an infragistics button with a calculator and a calendar.. also it didnt work.
so, cant i use the infragistics styles for other than infragistics controlls ???
and for infragistics controlls... what do i have to do else than adding that line of cod that loads the Style ???
thanks
App Sylist will only style infragistics controls. Are you using infragistics controls?
Also, I usually call in the constructor of the form instead of the Form_Load but either should work.
Also, I've noticed some style properties on controls...but they are usually defaulted so that they use loaded .isl. For example, StyleLibraryName, StyleSetName, UseAppStyling (should be true)
this is actually what i did yesterday... but nothing happend :S
any other suggestions ??
it didint worked at all !!!