mirror of
https://github.com/hawkeye-stan/msfs-popout-panel-manager.git
synced 2024-11-24 14:50:10 +00:00
41 lines
2.1 KiB
Text
41 lines
2.1 KiB
Text
|
<UserControl
|
||
|
x:Class="MSFSPopoutPanelManager.MainApp.AppUserControl.PopOutPanelCard.TouchEnabledButton"
|
||
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||
|
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
|
||
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||
|
xmlns:system="clr-namespace:System;assembly=mscorlib"
|
||
|
xmlns:viewModel="clr-namespace:MSFSPopoutPanelManager.MainApp.ViewModel"
|
||
|
mc:Ignorable="d">
|
||
|
<UserControl.Resources>
|
||
|
<system:Double x:Key="IconSize">22</system:Double>
|
||
|
<system:Double x:Key="ButtonSize">28</system:Double>
|
||
|
</UserControl.Resources>
|
||
|
<ToggleButton
|
||
|
Width="{StaticResource ButtonSize}"
|
||
|
Height="{StaticResource ButtonSize}"
|
||
|
d:DataContext="{d:DesignInstance viewModel:PopOutPanelConfigCardViewModel}"
|
||
|
materialDesign:ToggleButtonAssist.OnContent="{materialDesign:PackIcon Kind=HandBackRightOutline,
|
||
|
Size={StaticResource IconSize}}"
|
||
|
Background="Transparent"
|
||
|
Command="{Binding TouchEnabledCommand}"
|
||
|
IsChecked="{Binding DataItem.TouchEnabled, Mode=TwoWay}"
|
||
|
KeyboardNavigation.AcceptsReturn="False"
|
||
|
ToolTip="Toggle panel touch capability">
|
||
|
<ToggleButton.Style>
|
||
|
<Style BasedOn="{StaticResource MaterialDesignActionSecondaryToggleButton}" TargetType="ToggleButton">
|
||
|
<Style.Triggers>
|
||
|
<DataTrigger Binding="{Binding DataItem.TouchEnabled}" Value="True">
|
||
|
<Setter Property="Foreground" Value="LimeGreen" />
|
||
|
</DataTrigger>
|
||
|
</Style.Triggers>
|
||
|
</Style>
|
||
|
</ToggleButton.Style>
|
||
|
<materialDesign:PackIcon
|
||
|
Width="{StaticResource IconSize}"
|
||
|
Height="{StaticResource IconSize}"
|
||
|
Kind="HandBackRightOffOutline" />
|
||
|
</ToggleButton>
|
||
|
</UserControl>
|