-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCheckedButton.xaml
More file actions
23 lines (22 loc) · 921 Bytes
/
CheckedButton.xaml
File metadata and controls
23 lines (22 loc) · 921 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<?xml version="1.0" encoding="utf-8" ?>
<Button xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="MauiApp1.CheckedButton"
Text="Hello"
BackgroundColor="LightCyan"
Clicked="SwitchCheck">
<VisualStateManager.VisualStateGroups>
<VisualStateGroup x:Name="CheckedStates">
<VisualState x:Name="IsChecked">
<VisualState.Setters>
<Setter Property="BackgroundColor" Value="Lime"/>
</VisualState.Setters>
</VisualState>
<VisualState x:Name="Normal">
<VisualState.Setters>
<Setter Property="BackgroundColor" Value="LightCoral"/>
</VisualState.Setters>
</VisualState>
</VisualStateGroup>
</VisualStateManager.VisualStateGroups>
</Button>