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
Windows forms. I guess the request seems webby because that's what I usually work w/.
AppStylist isreally designed to allow you to style your whole application (hence the name).
But if you want only certain controls to be affected, what you would do is set the StyleSetName property on those controls. Then when you create your ApplicationStyleLibrary in AppStylist, you would create a StyleSet with that name. When you load that StyleLibrary at run-time, the StyleSet will only affect those controls whose StyleSetName matches up.
hello guys,i am using the component of the ApplicationStyling of Infragistics... and i am willing to use this component in in my project.. so i was testing it using the One line code provided by the tutorial which is: Infragistics.Win.AppStyling.StyleManager.Load("Trendy.isl")
this code was placed in the form_load event of my form.. but nothing happened !!!here is my code:(i am using VB.NET)
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Infragistics.Win.AppStyling.StyleManager.Load("Trendy.isl") End Sub
taking into considiration that the file named "Trendy.isl" is placed in the same directory as the .EXE file... but nothing has changed when loading the formalso i tried to drag and drop the component AppStylistRuntime and giving it the file name "Trendy.isl" in the FileLibraryName property.. also nothing changed !!please any help.. it's urgent i need to know where to place exactly that code.. or if i have to add something else to my form.thanks in advanced
That should work fine. Maybe youshould try putting Trendy.isl directly on c drive then Infragistics.Win.AppStyling.StyleManager.Load("C:\Trendy.isl") for troubleshooting?
this is actually what i did yesterday... but nothing happend :S
any other suggestions ??
it didint worked at all !!!
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)