<UserControl x:Class="Util.ManualDebug.ManualCell"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:local="clr-namespace:Util.ManualDebug"
|
xmlns:pu="https://opensource.panuon.com/wpf-ui"
|
mc:Ignorable="d" Padding="5" MaxHeight="80"
|
d:DesignHeight="450" d:DesignWidth="800">
|
<UserControl.Style>
|
<Style TargetType="UserControl">
|
<Style.Triggers>
|
<DataTrigger Binding="{Binding Selected}" Value="True">
|
<Setter Property="Background" Value="{DynamicResource SuccessColor}"/>
|
<Setter Property="Foreground" Value="#FFF"/>
|
</DataTrigger>
|
</Style.Triggers>
|
</Style>
|
</UserControl.Style>
|
<Grid>
|
<Grid.RowDefinitions>
|
<RowDefinition/>
|
<RowDefinition/>
|
</Grid.RowDefinitions>
|
<TextBlock FontSize="20" FontWeight="Bold" Text="{Binding Title}"/>
|
<pu:Switch Grid.Row="1" FontSize="18" BoxHeight="20" Cursor="Hand"
|
Content="关"
|
CheckedBackground="Green"
|
Background="Red"
|
CheckedContent="开"
|
IsChecked="{Binding Selected,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"/>
|
</Grid>
|
</UserControl>
|