[DevExpress Support Team: CLONED FROM T578454: SVG Skins and Palettes – FAQ]
The UserLookAndFeel.Default.StyleChanged event is not fired when the Palette is changed. How can I subscribe to an event when the palette changes?
I need to update the SVG Palette when the Palette has changed and haven't found a suitable event.
Cheers
Hello Michael,
I've tried to replicate this behavior but without success. I've attached a sample project and recorded a video to demonstrate how it works on my side. Could you please provide us with a simple project where the issue is reproducible? It will allow us to find a suitable solution quickly. I'm looking forward to your response.
Would it be too much trouble to demonstrate how to read both the type (basic, bezier, office etc…) and colour (blue dark, pine light etc…) within this event?
I managed to get this working to return the type and colour, however there is no colour/pallette name the first time the skin is changed for each type:
AddHandler DevExpress.LookAndFeel.UserLookAndFeel.Default.StyleChanged, AddressOf MyStyleChanged ... Private Sub MyStyleChanged(sender As Object, e As EventArgs) Dim sTypeName As String = TypeName(sender) Dim lookAndFeel As DevExpress.LookAndFeel.UserLookAndFeel = CType(sender, DevExpress.LookAndFeel.UserLookAndFeel) Dim stronglyTypedArgument As DevExpress.LookAndFeel.LookAndFeelChangedEventArgs = CType(e, DevExpress.LookAndFeel.LookAndFeelChangedEventArgs) Trace.WriteLine("MyStyleChanged: " & stronglyTypedArgument.Reason.ToString & ", " & lookAndFeel.SkinName & ", " & lookAndFeel.ActiveSvgPaletteName) End Sub
Could you please show me how to get the lookAndFeel.ActiveSvgPaletteName when the style is changed the first time?
Hi,
We will answer you in the following thread - How to catch the moment when a skin or palette is changed.