Ticket T1282702
Visible to All Users

Why does my toggle switch look so bad?

created a day ago

I'm trying to put a dark-mode toggle switch in my title bar. When doing so with the VS2019 light theme (toggles to VS2019 dark), the square is totally black, it stands out like a sore thumb. Ideally, it would have (any other color that aligns with the theme). Ideally, I'd like to be able to round the corners of the middle-thing, but the documentation only shows the outside corner radius.

Do I have any options here?

Clipboard-File-2.png

XAML
<dxe:ToggleSwitchEdit Margin="{StaticResource DefaultRightMargin}" CornerRadius="5" IsChecked="{Binding ThemeDarkModeActive}" /> </dxc:ThemedWindow.HeaderItems>

Answers approved by DevExpress Support

created a day ago

Hello Greg,

You can use the SwitchThumbTemplate property to customize thumb appearance. On the property page, we shared a snippet that you can use as a starting point for your custom solution:Example.

Please let me know if this helps.

Regards,
Alexander

    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.