Hi
I use SF and DevExpress controls in my application. For use properly the SF Themes and in order that DevExpress controls take the "look" similar to the SF theme I use this
In the main form of the application I put a RegistryRepository control that use for mantein the value of the current selected theme.
A constant in form level like this:
Private Const TemaAplicacion As String = "1" Then this routine that read the registry value and load the SF theme, then I match the SF theme with one similar to DevExpress themes, this way if theme in SF is one of the two black themes I pick up a similar for DevExpress.
Notice that doing this way, you not need to define a theme for DevExpress controls in other forms, as this is the main form, all forms you use and open will use this same theme. This is just visible in runtime mode.
''' <summary>''' Default Constructor''' </summary>''' <remarks></remarks>Public Sub New()' This call is required by the Windows Form Designer.InitializeComponent()
'-- For load themeMe.ApplicationTheme.Theme = CType(Me.RegistryTema.ReadString(TemaAplicacion, "9"), MicroFour.StrataFrame.UI.Windows.Forms.ApplicationThemeName)Select Case Me.ApplicationTheme.ThemeCase 0AssignCheck(tsBtnWindowsColors)
DevExpress.LookAndFeel.UserLookAndFeel.Default.SkinName =
"Money Twins"Case 1AssignCheck(tsBtnBlackIce)
DevExpress.LookAndFeel.UserLookAndFeel.Default.SkinName =
"Black"Case 3AssignCheck(tsBtnSinTema)
DevExpress.LookAndFeel.UserLookAndFeel.Default.SkinName =
"Blue"Case 4AssignCheck(tsBtnBlackout)
DevExpress.LookAndFeel.UserLookAndFeel.Default.SkinName =
"Black"Case 5AssignCheck(tsBtnWindowsRefracted)
DevExpress.LookAndFeel.UserLookAndFeel.Default.SkinName =
"Money Twins"Case 6AssignCheck(tsBtnBlueSkies)
DevExpress.LookAndFeel.UserLookAndFeel.Default.SkinName =
"Blue"Case 8AssignCheck(tsBtnSandDunes)
DevExpress.LookAndFeel.UserLookAndFeel.Default.SkinName =
"Caramel"Case 9AssignCheck(tsBtnCoolBreeze)
DevExpress.LookAndFeel.UserLookAndFeel.Default.SkinName =
"Blue"Case ElseAssignCheck(tsBtnSandDunes)
DevExpress.LookAndFeel.UserLookAndFeel.Default.SkinName =
"Black"End Select'-- Add handlersAddHandlers()
End Sub For the AddHandlers function (last line in the past routine) this is the code:
'-- Aade manejadores de eventoPrivate Sub AddHandlers()AddHandler SecurityBasics.CurrentUserChanged, AddressOf HandleCurrentUserChangedEnd Sub I have a menu bar and one of the options is a select the theme, you can find a sample to do this in the SF samples.
Kindest regards
Everything is possible, just keep trying...