Ticket T696266
Visible to All Users

The UserLookAndFeel.Default.StyleChanged event is not raised if a palette is changed

created 6 years ago

[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

Show previous comments (1)

    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:

      Visual Basic
      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?

      DevExpress Support Team 5 years ago

        Hi,

        We will answer you in the following thread - How to catch the moment when a skin or palette is changed.

        Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

        Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.