Skip to content

ResourceImages Property

Description

Specifies which resource theme to use. This is used to set Office 2007, Office 2007/2010 Ribbon, Office 2010, or Windows 7 appearances.

Property Type

Read-only property

Syntax (Visual Basic)

Public Property ResourceImages() As [ResourceImages](XtremeCalendarControl~ResourceImages.md)

Return Type

Reference to the ResourceImages object used.

Remarks

ResourceThemeImages is used to tell the control which resource to use for its appearance. This will point to one of the "style" DLLs that tell the control which colors to use. The "style" DLLs hold images and colors for the specified theme. For example, Office 2007, Office 2007/2010 Ribbon, Office 2010, and Windows 7 appearances are stored in a resource DLL that you need ResourceThemeImages to set these appearances.

ResourceThemeImages allows you to load the Resource Image DLL using LoadFromFile. It also contains the DllFileName and IniFileName.

To utilize these styles, the control must set the theme to xtpColumnResource AFTER the resource DLL has been loaded. The list of supported styles is listed below. In the code sample section, there is a snippet of code to show how to use the Resource themes with each control.

Supported Styles as of Version 15.0:

  • Office2007.dll
  • Office2007Aqua.ini
  • Office2007Black.ini
  • Office2007Blue.ini
  • Office2007Silver.ini

  • Office2010.dll

  • Office2010Black.ini
  • Office2010Blue.ini
  • Office2010Silver.ini

  • Windows7.dll

  • Windows7Blue.ini

Note: You will need to include these DLL files in your installation if you use them.

Example

[ResourceThemeImages Sample (Visual Basic)]

This sample illustrates how to use the ResourceThemeImages property to change the color used when the Office 2007 or Ribbon theme is applied.

'*** Standard toolbars ***

' Set to the Office 2010 Blue. Note that you need to include the name of the ini as well
CommandBarsGlobalSettings.ResourceImages.LoadFromFile App.Path & "\..\..\..\Styles\Office2010.dll", "Office2010Blue.ini"
CommandBars.VisualTheme = xtpThemeResource
CommandBars.PaintManager.RefreshMetrics
CommandBars.RecalcLayout

' Set to the Office 2010 Black. Note that you need to include the name of the ini as well
CommandBarsGlobalSettings.ResourceImages.LoadFromFile App.Path & "\..\..\..\Styles\Office2010.dll", "Office2010Black.ini"
CommandBars.VisualTheme = xtpThemeResource
CommandBars.PaintManager.RefreshMetrics
CommandBars.RecalcLayout

' Set to the Office 2007 Blue. Note that you need to include the name of the ini as well
CommandBarsGlobalSettings.ResourceImages.LoadFromFile App.Path & "\..\..\..\Styles\Office2007.dll", "Office2007Blue.ini"
CommandBars.VisualTheme = xtpThemeResource
CommandBars.PaintManager.RefreshMetrics
CommandBars.RecalcLayout

'*** Ribbon Bar ***

' Set Ribbon theme to Office 2007 silver
CommandBarsGlobalSettings.ResourceImages.LoadFromFile App.Path & "\..\..\..\Styles\Office2007.dll", "Office2007Silver.ini"
CommandBars.VisualTheme = xtpThemeRibbon
ControlFile.Style = xtpButtonAutomatic
CommandBars.PaintManager.RefreshMetrics
CommandBars.RecalcLayout

' Set Ribbon theme to Office 2010 blue
CommandBarsGlobalSettings.ResourceImages.LoadFromFile App.Path & "\..\..\..\Styles\Office2010.dll", "Office2010Blue.ini"
CommandBars.VisualTheme = xtpThemeRibbon
ControlFile.Style = xtpButtonCaption
CommandBars.PaintManager.RefreshMetrics
CommandBars.RecalcLayout

' Set Ribbon theme to Windows 7 Scenic
CommandBarsGlobalSettings.ResourceImages.LoadFromFile App.Path & "\..\..\..\Styles\Windows7.dll", "Windows7Blue.ini"
CommandBars.VisualTheme = xtpThemeRibbon
ControlFile.Style = xtpButtonCaption
CommandBars.PaintManager.RefreshMetrics
CommandBars.RecalcLayout

'*** Shortcut Bar ***

' Set ShortcutBar to Office 2007 Black
ShortcutBarGlobalSettings.ResourceThemeImages.LoadFromFile App.Path & "\..\..\..\Styles\Office2007.dll", "Office2007Black.ini"
wndShortcutBar.VisualTheme = xtpShortcutThemeResource

' Set ShortcutBar to Office 2010 Black
ShortcutBarGlobalSettings.ResourceThemeImages.LoadFromFile App.Path & "\..\..\..\Styles\Office2010.dll", "Office2010Black.ini"
wndShortcutBar.VisualTheme = xtpShortcutThemeResource

'*** Grid control ***

' Set GridControl to Office 2007 Black
GridControlGlobalSettings.ResourceThemeImages.LoadFromFile App.Path & "\..\..\..\Styles\Office2007.dll", "Office2007Black.ini"
wndGridControl.PaintManager.ColumnStyle = xtpColumnResource

' Set GridControl to Office 2010 Black
GridControlGlobalSettings.ResourceThemeImages.LoadFromFile App.Path & "\..\..\..\Styles\Office2010.dll", "Office2010Black.ini"
wndGridControl.PaintManager.ColumnStyle = xtpColumnResource

'*** Docking Pane ***

' Set Docking Pane to Office 2007 Black
DockingPaneGlobalSettings.ResourceThemeImages.LoadFromFile App.Path & "\..\..\..\Styles\Office2007.dll", "Office2007Black.ini"
DockingPaneManager.VisualTheme = ThemeResource

' Set Docking Pane to Office 2010 Black
DockingPaneGlobalSettings.ResourceThemeImages.LoadFromFile App.Path & "\..\..\..\Styles\Office2010.dll", "Office2010Black.ini"
DockingPaneManager.VisualTheme = ThemeResource

'*** Calendar ***

' Set Calendar to Office 2007 Black
CalendarGlobalSettings.ResourceThemeImages.LoadFromFile App.Path & "\..\..\..\Styles\Office2007.dll", "Office2007Black.ini"
CalendarControl.VisualTheme = xtpCalendarThemeResource

' Set Calendar to Office 2010 Black
CalendarGlobalSettings.ResourceThemeImages.LoadFromFile App.Path & "\..\..\..\Styles\Office2010.dll", "Office2010Black.ini"
CalendarControl.VisualTheme = xtpCalendarThemeResource

'*** Task Panel ***

' Set Task Panel to Office 2007 Black
TaskPanelGlobalSettings.ResourceThemeImages.LoadFromFile App.Path & "\..\..\..\Styles\Office2007.dll", "Office2007Black.ini"
TaskPanelGlobalSettings.VisualTheme = xtpTaskPanelThemeResource

' Set Task Panel to Office 2010 Black
TaskPanelGlobalSettings.ResourceThemeImages.LoadFromFile App.Path & "\..\..\..\Styles\Office2010.dll", "Office2010Black.ini"
TaskPanelGlobalSettings.VisualTheme = xtpTaskPanelThemeResource

'*** Property Grid ***

' Set Property Grid to Office 2007 Black
PropertyGridGlobalSettings.ResourceThemeImages.LoadFromFile App.Path & "\..\..\..\Styles\Office2007.dll", "Office2007Black.ini"
PropertyGridGlobalSettings.VisualTheme = xtpGridThemeResource

' Set Property Grid to Office 2010 Black
PropertyGridGlobalSettings.ResourceThemeImages.LoadFromFile App.Path & "\..\..\..\Styles\Office2010.dll", "Office2010Black.ini"
PropertyGridGlobalSettings.VisualTheme = xtpGridThemeResource

'*** Controls ***

' Set Controls to Office 2007 Black
SuiteControlsGlobalSettings.ResourceThemeImages.LoadFromFile App.Path & "\..\..\..\Styles\Office2007.dll", "Office2007Black.ini"
ComboBox.Appearance = xtpAppearanceResource
Button.Appearance = xtpAppearanceResource
Edit.Appearance = xtpAppearanceResource
RadioButton.Appearance = xtpAppearanceResource
TreeView.Appearance = xtpAppearanceResource
ListView.Appearance = xtpAppearanceResource
ProgressBar.Appearance = xtpAppearanceResource
ScrollBar.Appearance = xtpAppearanceResource
HexEdit.Appearance = xtpAppearanceResource
ColorPicker.Appearance = xtpAppearanceResource
CheckBox.Appearance = xtpAppearanceResource

' Set Controls to Office 2010 Black
SuiteControlsGlobalSettings.ResourceThemeImages.LoadFromFile App.Path & "\..\..\..\Styles\Office2010.dll", "Office2010Black.ini"
ComboBox.Appearance = xtpAppearanceResource
Button.Appearance = xtpAppearanceResource
Edit.Appearance = xtpAppearanceResource
RadioButton.Appearance = xtpAppearanceResource
TreeView.Appearance = xtpAppearanceResource
ListView.Appearance = xtpAppearanceResource
ProgressBar.Appearance = xtpAppearanceResource
ScrollBar.Appearance = xtpAppearanceResource
HexEdit.Appearance = xtpAppearanceResource
ColorPicker.Appearance = xtpAppearanceResource
CheckBox.Appearance = xtpAppearanceResource

See Also

GridControlGlobalSettings Object


Copyright (c) 1998-2024 Codejock Technologies. All rights reserved.