Hello
I am having trouble in understanding how to used the Application Styling Components. I have seen the sample but I still don't understand it.
I've been told that -in the case of the UltraGrid- I should use App Styling instead of Presets. I would like to know the coding required (in VB) in order to give an UltraGrid the Look & Feel of Office 2007. Should I use an isl file? (I'd rather have the file as an embeded resource). Why the StyleManager object has Properties referring to Office 2007?
Thanks a lot.
EMoscosoCam said: Thanks. I made it work. Now, I would like to apply the styling to only the ultragrid instances, since the other controls were manually set to have an Office 2007 Style. How can I accomplish that? Thanks again.
Thanks. I made it work.
Now, I would like to apply the styling to only the ultragrid instances, since the other controls were manually set to have an Office 2007 Style. How can I accomplish that?
Thanks again.
Setting UseAppStyling property to false on every control except the grid instances is crazy work considering the number of controls you might use on a single form. Here's the easiest way to do what you needed.
//Load the ISL style and only reference its use on ultraGrid1 //You can add the other grids the same way Infragistics.Win.AppStyling.StyleManager.Load("Windows7.isl", true, "Windows7"); ultraGrid1.StyleLibraryName = "Windows7"; //In case you didn't know this about the Office 2007 Look & Feel //The blend color is a pretty neat property to play around with Office2007ColorTable.ColorScheme = Office2007ColorScheme.Black; Office2007ColorTable.CustomBlendColor = Color.Silver;
(Sorry for the C# syntax...and I just realized this was a reply to a 2008 posting, whoops)
Perfect!
That was very easy.
I load the style from the resources in other way. Perhaps this could help you:
Dim objStream As IO.MemoryStream objStream = New IO.MemoryStream(My.Resources.Office2007Blue)Infragistics.Win.AppStyling.StyleManager.Load(objStream)
Mike,
I have added an '.isl' file that I added as a resource. I now want to use the file to set the Appstyling.
Here is what I am doing, however s is always nothing:
Dim s As System.IO.Stream = Nothing s = (System.Reflection.Assembly.GetExecutingAssembly()).GetManifestResourceStream("Office2007Blue.isl") If Not s Is Nothing Then Infragistics.Win.AppStyling.StyleManager.Load(s) End If
Can you provide an example?? Or indicate what is wrong above??
No, not really. There's no way to do this without doing something in your application code.
If you don't want to set UseAppStyling, then another way to do it is to assign a StyleSetName to the grids in your application. Then in your application style library, you create a StyleSet with that name and apply the settings you want. Only controls whose StyleSetName matches up will pick up settings from that StyleSet.