Hello!
I have just started to set up an new windows application project with an mdi form as "base". The user should be able to change between different styles at runtime, via a UltraToolbarManager control. I also want to be able to save the style that the user selects so that I can load upon next startup. Are there any direst methods for this, or do you simple create your own xml etc?
I am interested in using the Office2007 themes (blue, black, silver). When I started to browse for best practise, I ended up with more then one solution.
One solution seems to be to set the Style of the UltraToolbarManager that is placed on the MDI-form. I can set Office2007 as style, but I don't know how to set it to the Black theme directly. Does anyone know if that is possible, and int hat case how? There are two properties availble (StyleLibraryName, StyleSetName) but I don't know how they work.
As far as I understand, anotheroption is to use the .isl files that comes with the package. If I use something like:
Infragistics.Win.AppStyling.StyleManager.Load(StylesFolder & "\Office2007Black.isl")
, I will be able to set the style.
Another method that I have seen in Infragistics examples are:
Office2007ColorTable.ColorScheme = DirectCast(MyObject, Office2007ColorScheme)
Can someone point me in the right direction, and explain the different approaches and which will be the best for my situation?
Thanks!
/Henrik
Hello Henrik,
Thank you for contacting Infragistics.
I believe your best option would be to use the ISL files in the same way that I've done in the attached sample.
Please let me know if you have any questions about this.
I guess that your project is written in a newer version of VS compared to what I have? I cannot open the solution.
I am using VS2010.
Thank you for your response.
All you need to do is open the solution file in Notepad and replace "# Visual Studio 2013" with "# Visual Studio 2010" (without quotes).
Like this?
Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 2010 VisualStudioVersion = 12.0.21005.1 MinimumVisualStudioVersion = 10.0.40219.1 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AppStylingSample", "AppStylingSample\AppStylingSample.csproj", "{D1E6E1F1-B752-4F62-9A3C-CC351B9E3199}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {D1E6E1F1-B752-4F62-9A3C-CC351B9E3199}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {D1E6E1F1-B752-4F62-9A3C-CC351B9E3199}.Debug|Any CPU.Build.0 = Debug|Any CPU {D1E6E1F1-B752-4F62-9A3C-CC351B9E3199}.Release|Any CPU.ActiveCfg = Release|Any CPU {D1E6E1F1-B752-4F62-9A3C-CC351B9E3199}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection EndGlobal
Didn't work, says it is incompatible...
It turns out there is an additional line that needs to be changed. The Format Version in the first line of the file should be changed to 11.00.
That didn't help either unfortunately, but I installed VS2013 instead. That did the trick ;-)
I have implemented the code you sent me in my project and it works like a charm...
If you have time, I will be very pleased if you can explain the differences between this method and theother that I mentioned. Always good to know..
/H