<UserControl x:Class="FLY.Thick.Base.UI.UiModule.MenuMotion"
             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:FLY.Thick.Base.UI.UiModule"
             xmlns:iconPacks="http://metro.mahapps.com/winfx/xaml/iconpacks"
             xmlns:common="clr-namespace:FLY.Thick.Base.Common;assembly=FLY.Thick.Base"
             mc:Ignorable="d" >
    <UserControl.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="pack://application:,,,/FLY.Thick.Base.UI;component/Themes/Styles.xaml"/>
            </ResourceDictionary.MergedDictionaries>
            <SolidColorBrush x:Key="ActivatedBrush" Color="#FF23d96e" />
            <SolidColorBrush x:Key="ActivatedBrush2" Color="Red" />
            <SolidColorBrush x:Key="NoActivatedBrush" Color="White" />
            <SolidColorBrush x:Key="TextBrush" Color="White" />
        </ResourceDictionary>
    </UserControl.Resources>
    <StackPanel>
        <Button Click="btnScanClick">
            <Button.Style>
                <Style TargetType="Button" BasedOn="{StaticResource Styles.Button.Icon}">
                    <Setter Property="Foreground" Value="{StaticResource NoActivatedBrush}"/>
                    <Style.Triggers>
                        <DataTrigger Binding="{Binding DynArea.ControllerState}" Value="{x:Static common:CTRL_STATE.SCAN}">
                            <Setter Property="Foreground" Value="{StaticResource ActivatedBrush}"/>
                        </DataTrigger>
                    </Style.Triggers>
                </Style>
            </Button.Style>
            <StackPanel >
                <iconPacks:PackIconMaterial Kind="Rotate3dVariant" />
                <!--<iconPacks:PackIconMaterial Kind="TapeMeasure" />-->
                <!--<iconPacks:PackIconMaterial Kind="TransitTransfer" />-->
                <TextBlock Text="扫描" Foreground="{StaticResource TextBrush}"/>
            </StackPanel>
        </Button>
        <Button Click="btnStopClick">
            <Button.Style>
                <Style TargetType="Button" BasedOn="{StaticResource Styles.Button.Icon}">
                    <Setter Property="Foreground" Value="{StaticResource NoActivatedBrush}"/>
                    <Style.Triggers>
                        <DataTrigger Binding="{Binding DynArea.ControllerState}" Value="{x:Static common:CTRL_STATE.FIX}">
                            <Setter Property="Foreground" Value="{StaticResource ActivatedBrush2}"/>
                        </DataTrigger>
                        <DataTrigger Binding="{Binding DynArea.ControllerState}" Value="{x:Static common:CTRL_STATE.STOP}">
                            <Setter Property="Foreground" Value="{StaticResource ActivatedBrush2}"/>
                        </DataTrigger>
                    </Style.Triggers>
                </Style>
            </Button.Style>
            <StackPanel >
                <iconPacks:PackIconMaterial Kind="CloseCircle" />
                <TextBlock Text="停止" Foreground="{StaticResource TextBrush}"/>
            </StackPanel>
        </Button>
        <Button Click="btnOrgClick">
            <Button.Style>
                <Style TargetType="Button" BasedOn="{StaticResource Styles.Button.Icon}">
                    <Setter Property="Foreground" Value="{StaticResource NoActivatedBrush}"/>
                    <Style.Triggers>
                        <DataTrigger Binding="{Binding DynArea.ControllerState}" Value="{x:Static common:CTRL_STATE.ORG}">
                            <Setter Property="Foreground" Value="{StaticResource ActivatedBrush}"/>
                        </DataTrigger>
                    </Style.Triggers>
                </Style>
            </Button.Style>
            <StackPanel >
                <iconPacks:PackIconMaterial Kind="Adjust" />
                <TextBlock Text="归零" Foreground="{StaticResource TextBrush}"/>
            </StackPanel>
        </Button>
        <Button Click="btnForwClick">
            <Button.Style>
                <Style TargetType="Button" BasedOn="{StaticResource Styles.Button.Icon}">
                    <Setter Property="Foreground" Value="{StaticResource NoActivatedBrush}"/>
                    <Style.Triggers>
                        <DataTrigger Binding="{Binding DynArea.ControllerState}" Value="{x:Static common:CTRL_STATE.FORW}">
                            <Setter Property="Foreground" Value="{StaticResource ActivatedBrush}"/>
                        </DataTrigger>
                    </Style.Triggers>
                </Style>
            </Button.Style>
            <StackPanel >
                <iconPacks:PackIconMaterial Kind="ArrowRightBoldCircle" />
                <TextBlock Text="正行" Foreground="{StaticResource TextBrush}"/>
            </StackPanel>
        </Button>
        <Button Click="btnBackwClick">
            <Button.Style>
                <Style TargetType="Button" BasedOn="{StaticResource Styles.Button.Icon}">
                    <Setter Property="Foreground" Value="{StaticResource NoActivatedBrush}"/>
                    <Style.Triggers>
                        <DataTrigger Binding="{Binding DynArea.ControllerState}" Value="{x:Static common:CTRL_STATE.BACKW}">
                            <Setter Property="Foreground" Value="{StaticResource ActivatedBrush}"/>
                        </DataTrigger>
                    </Style.Triggers>
                </Style>
            </Button.Style>
            <StackPanel >
                <iconPacks:PackIconMaterial Kind="ArrowLeftBoldCircle" />
                <TextBlock Text="反行" Foreground="{StaticResource TextBrush}"/>
            </StackPanel>
        </Button>
    </StackPanel>
</UserControl>
