Setting Same Colors for Light 7 Dark Theme

3 posts, 1 answers
  1. Aaron
    Aaron avatar
    13 posts
    Member since:
    Dec 2012

    Posted 25 Dec 2012 Link to this post

    I am using a dark background for all my pages so would like the same look and feel for the ToggleSwitch whether it is in Light theme or Dark them.  The actual toggle button (not the checked or unchecked background) is White on Dark Theme and Black on Light Theme.  I would like the button to be filled White in both modes.

     I have attached images ToggleDark.png and ToggleLight.png with this post.  I just want the control to look the same in both Dark and Light themes.  I would like the control to look like image ToggleDark.png in both modes if that is possible.

    I have got the following code so far:

    xmlns:Controls1="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Primitives"

    xmlns:Controls="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Input"

    xmlns:telerikToggleSwitch="clr-namespace:Telerik.Windows.Controls.ToggleSwitch;assembly=Telerik.Windows.Controls.Primitives"

    <Controls1:RadToggleSwitch x:Name="tsSettings" Header="show settings?" Foreground="White" IsChecked="False">

    <Controls1:RadToggleSwitch.HeaderTemplate>

    <DataTemplate>

    <ContentControl Foreground="White" Background="White" Content="{Binding}"/>

    </DataTemplate>

    </Controls1:RadToggleSwitch.HeaderTemplate>

    <Controls1:RadToggleSwitch.ButtonStyle>

    <Style TargetType="telerikToggleSwitch:ToggleSwitchButton">

    <Setter Property="CheckBackground" Value="#FFFF0000"/>

    <Setter Property="Background" Value="White"/>

    <Setter Property="BorderBrush" Value="White"/>

    </Style>

    </Controls1:RadToggleSwitch.ButtonStyle>

    </Controls1:RadToggleSwitch>


    Thanks for all your help :)
  2. Answer
    Todor
    Admin
    Todor avatar
    778 posts

    Posted 28 Dec 2012 Link to this post

    Hi Aaron,

    Here's how you can change the color for the ToggleSwitch button:
    <telerikPrimitives:RadToggleSwitch.ButtonStyle>
        <Style TargetType="telerikToggleSwitch:ToggleSwitchButton">
            <Setter Property="ThumbBackground" Value="Green"/>
        </Style>
    </telerikPrimitives:RadToggleSwitch.ButtonStyle>

    Let me know if you need additional assistance.

    All the best,
    Todor
    the Telerik team
    Have a suggestion or face a problem - you can use the Ideas & Feedback portal to submit ideas, feedback and vote for them.
  3. DevCraft banner
  4. Aaron
    Aaron avatar
    13 posts
    Member since:
    Dec 2012

    Posted 05 Jan 2013 Link to this post

    Thank you!
Back to Top