MenuMotion.xaml 5.88 KB
Newer Older
1 2 3 4 5 6 7
<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"
8
             xmlns:common="clr-namespace:FLY.Thick.Base.Common;assembly=FLY.Thick.Base"
9 10 11 12
             mc:Ignorable="d" >
    <UserControl.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
13
                <ResourceDictionary Source="pack://application:,,,/FLY.Thick.Base.UI;component/Themes/Styles.xaml"/>
14
            </ResourceDictionary.MergedDictionaries>
15 16 17 18
            <SolidColorBrush x:Key="ActivatedBrush" Color="#FF23d96e" />
            <SolidColorBrush x:Key="ActivatedBrush2" Color="Red" />
            <SolidColorBrush x:Key="NoActivatedBrush" Color="White" />
            <SolidColorBrush x:Key="TextBrush" Color="White" />
19 20 21
        </ResourceDictionary>
    </UserControl.Resources>
    <StackPanel>
22 23 24 25 26 27 28 29 30 31 32
        <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>
33
            <StackPanel >
34 35 36
                <iconPacks:PackIconMaterial Kind="Rotate3dVariant" />
                <!--<iconPacks:PackIconMaterial Kind="TapeMeasure" />-->
                <!--<iconPacks:PackIconMaterial Kind="TransitTransfer" />-->
37
                <TextBlock Text="扫描" Foreground="{StaticResource TextBrush}"/>
38 39
            </StackPanel>
        </Button>
40 41 42 43 44 45 46 47 48 49 50 51 52 53
        <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>
54 55
            <StackPanel >
                <iconPacks:PackIconMaterial Kind="CloseCircle" />
56
                <TextBlock Text="停止" Foreground="{StaticResource TextBrush}"/>
57 58
            </StackPanel>
        </Button>
59 60 61 62 63 64 65 66 67 68 69
        <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>
70 71
            <StackPanel >
                <iconPacks:PackIconMaterial Kind="Adjust" />
72
                <TextBlock Text="归零" Foreground="{StaticResource TextBrush}"/>
73 74
            </StackPanel>
        </Button>
75 76 77 78 79 80 81 82 83 84 85
        <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>
86 87
            <StackPanel >
                <iconPacks:PackIconMaterial Kind="ArrowRightBoldCircle" />
88
                <TextBlock Text="正行" Foreground="{StaticResource TextBrush}"/>
89 90
            </StackPanel>
        </Button>
91 92 93 94 95 96 97 98 99 100 101
        <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>
102 103
            <StackPanel >
                <iconPacks:PackIconMaterial Kind="ArrowLeftBoldCircle" />
104
                <TextBlock Text="反行" Foreground="{StaticResource TextBrush}"/>
105 106 107 108
            </StackPanel>
        </Button>
    </StackPanel>
</UserControl>