How to load a visual theme?
By default, the Office 2010 Blue theme is used. You can change the default theme at design time by drag-and-dropping the theme selector component from the Toolbox window and selecting a theme. The selected theme will then be used when you start the application.
Alternatively you can change the default theme in the Main method of the application:
[C#]static void Main()
. . .
SkinManager.DefaultTheme = EmbeddedTheme.Office2010TP; // can be any other theme
. . .
Shared Sub Main(ByVal args As String())
. . .
SkinManager.DefaultTheme = EmbeddedTheme.Office2010TP ' can be any other theme
. . .
CType(New Program(), Program).Run(args)
. . .
At runtime you can change visual themes using the
SkinManager.LoadEmbeddedTheme method. For example, if you want to load the Office 2010 Black theme, use the following code:
After upgrading to v.3.1, I am getting a warning "This method loads themes for all existing components …". What causes this warning?
The complete warning message is "This method loads themes for all existing components and will generate an exception if one of the components is not installed. Use LoadEmbeddedTheme(EmbeddedTheme theme, Product product) method instead. For the list of existing components see Elegant.Ui.Products enum". Starting from v.3.1, visual themes are loaded in a completely different way. Both Elegant Ribbon and Elegant Common Controls have their own sets of visual themes, which are stored in separate assemblies. Because of that, you should load the needed themes separately for each product by using the following method:
LoadEmbeddedTheme(EmbeddedTheme theme, Product product);
LoadEmbeddedTheme(EmbeddedTheme theme, Product product)
After deploying my application, it fails to start because some visual theme assemblies are not found. What files should I deploy on client machines to solve this problem?
In the ..\Program Files\FOSS Software Inc\Elegant Ribbon\Bin folder, you can find several assembly files with visual themes. Each file corresponds to a particular visual theme (for example, System) for a particular product (for example, Elegant Ribbon). You should make sure that all assemblies with the themes you are using in your application are available on client machines. So, if your ribbon-based application uses only the System theme, these are Elegant.Ui.Ribbon.Theme.System.dll (for the ribbon) and Elegant.Ui.Common.Theme.System.dll (for common controls). We would recommend that you put these assemblies into GAC.
What visual styles are supported by the System theme?
The System theme makes your application having a visual style provided by the operating system on which it is running. The supported visual styles include those available on Windows OSes starting from Windows 2000 including Windows 7. Please note that custom classic theme colorizations are also supported, which means that any customizations to the system theme are applied to the System visual theme automatically.
If you have any questions, please visit our forum or contact our technical support team at firstname.lastname@example.org.