The appearance of each SmartControl can be modified to give it an OfficeXP or Office2003, a classic Windows style as well as the WindowsXP style which is available for both XP and non-XP operating systems.
Not all SmartControls support all styles. The following table provides a list of the available SmartControls and their supported styles.
SmartControl | Description |
---|---|
SmartCheckedListBox | The Windows Classis, OfficeXP, WindowsXP, and ResourceAssembly styles are supported. |
SmartExplorerTaskPane | The Windows Classis, WindowsXP, and ResourceAssembly styles are supported. |
SmartMenuBar | The Windows Classis, OfficeXP, WindowsXP, Office2003,and ResourceAssembly styles are supported. |
SmartOfficeTaskPane | The OfficeXP and Office2003 styles are supported. |
SmartOptionList | The Windows Classis, OfficeXP, WindowsXP, and ResourceAssembly styles are supported. |
SmartOutlookShortcutBar | The Windows Classis, OfficeXP, WindowsXP, and ResourceAssembly styles are supported. |
SmartStatusBar | The Windows Classis, OfficeXP, WindowsXP, Office2003, and ResourceAssembly styles are supported. |
SmartTabStrip | The OfficeXP style is supported. |
SmartToolBar | The Windows Classis, OfficeXP, WindowsXP, Office2003, and ResourceAssembly styles are supported. |
SmartTreeView | The Windows Classis, WindowsXP, and ResourceAssembly styles are supported. |
A SmartControl's style can be changed by setting the UIStyle and UIStyleResourceAssembly properties. By default, the appearance of a SmartControl will be set to WindowsXP unless it is not supported by the SmartControl. In the case where it is not supported, the OfficeXP style will be used.
When the UIStyle property is set to WindowsXP on Windows XP machines, the current theme will be used. On non-Windows XP machines, or on XP machines that have the Windows classic look set, the blue XP theme style will be used.
If you want to force a style in particular, for example the Blue, Olive Green or Silver XP themes, the UIStyleResourceAssembly property must be set. For example, in the code below, we will force the use of the Olive Green WindowsXP theme (regardless of the OS) :
Xceed SmartUI for WinForms provides three resource assemblies that contain the Blue, Olive Green and Silver WindowsXP themes. These resource assemblies can be used to force an XP-style on both XP and non-XP operating systems.
The Blue XP theme is defined in the Xceed.SmartUI.UIStyles.WindowsXP.Blue.DLL resource assembly, the Olive Green in Xceed.SmartUI.UIStyles.WindowsXP.OliveGreen.DLL and the Silver in Xceed.SmartUI.UIStyle.WindowsXP.Silver.DLL.
To use a resource style, the UIStyle property must be set to ResourceAssembly and the UIStyleResourceAssembly property set to appropriate resource assembly (as demonstrated above).