Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
900
AppStyling vs OSThemes
posted

Hallo,

which is the simplest way to switch On/Off UseAppStyling and UseOSThemes for all controls in the application at runtime?

We need three states:
- Standard: UseAppStyling is off, UseOSThemes is off.
- System: UseAppStyling is off, UseOSThemes is on.
- Styles: UseAppStyling is on, UseOSThemes is off.

All of our controls have the default properties in the WindowsForms Designer:
- UseAppStyling = true
- UseOSThemes = DefaultableBoolean.Default

Parents
  • 469350
    Offline posted

    Hi,

    jabor said:
    - Styles: UseAppStyling is on, UseOSThemes is off.

    This case is easy enough to handle, since the isl will turn off themes by default.

    jabor said:
    - Standard: UseAppStyling is off, UseOSThemes is off.
    - System: UseAppStyling is off, UseOSThemes is on.

    To turn off the isl, you would do this:

    StyleManager.Reset();

    I don't think there is any static property to turn off themes on all of the controls. But what you could do is just create a new Style Library in AppStylist. When you do this, AppStylist will prompt you if you want to turn off themes and you click Yes. Then you just save that style library which does nothing but turn off themes and load that when you want themes off and no other styling applied.

Reply Children