Last active
May 29, 2020 15:10
-
-
Save ChaseFlorell/45db24304f1146b9d6d44ae179a5c687 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Style TargetType="Switch"> | |
<Setter Property="OnColor" Value="{DynamicResource SwitchOnColor}" /> | |
<Setter Property="ThumbColor" Value="{DynamicResource SwitchOnThumbColor}" /> | |
<Style.Triggers> | |
<Trigger TargetType="Switch" Property="IsToggled" Value="False"> | |
<Setter Property="ThumbColor" Value="{DynamicResource SwitchOffThumbColor}" /> | |
</Trigger> | |
</Style.Triggers> | |
</Style> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<OnPlatform x:Key="SwitchOnThumbColor" x:TypeArguments="Color"> | |
<On Platform="Android" Value="#fb9e40"/> <!-- AccentColor --> | |
</OnPlatform> | |
<OnPlatform x:Key="SwitchOffThumbColor" x:TypeArguments="Color"> | |
<On Platform="Android" Value="#f3f4f4"/> <!-- TextColor --> | |
</OnPlatform> | |
<OnPlatform x:Key="SwitchOnColor" x:TypeArguments="Color"> | |
<On Platform="iOS" Value="#fb9e40"/> <!-- AccentColor --> | |
<On Platform="Android" Value="#dfe0e1"/> <!-- Gray similar to iOS --> | |
</OnPlatform> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment