<UserControl
    x:Class="XplorePlane.Views.AxisControlPanelView"
    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:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    d:DesignHeight="260"
    d:DesignWidth="340"
    mc:Ignorable="d">
    <UserControl.Resources>
        <Style x:Key="GreenValueBox" TargetType="Border">
            <Setter Property="Background" Value="#00CC00" />
            <Setter Property="CornerRadius" Value="10" />
            <Setter Property="Padding" Value="8,3" />
            <Setter Property="Margin" Value="0,0,4,5" />
            <Setter Property="MinWidth" Value="68" />
        </Style>
        <Style x:Key="GrayValueBox" TargetType="Border">
            <Setter Property="Background" Value="#D8D8D8" />
            <Setter Property="CornerRadius" Value="10" />
            <Setter Property="Padding" Value="8,3" />
            <Setter Property="Margin" Value="0,0,4,5" />
            <Setter Property="MinWidth" Value="48" />
        </Style>
    </UserControl.Resources>
    <Grid Background="#F0F0F0">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="*" />
            <RowDefinition Height="Auto" />

        </Grid.RowDefinitions>

        <!--  标题  -->
        <TextBlock
            Grid.Row="0"
            Margin="8,6,0,6"
            HorizontalAlignment="Left"
            FontSize="13"
            FontWeight="SemiBold"
            Foreground="#333333"
            Text="运动控制" />

        <!--  主体  -->
        <Grid Grid.Row="1" Margin="8,0,8,4">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto" />
                <ColumnDefinition Width="Auto" />
                <ColumnDefinition Width="*" />
            </Grid.ColumnDefinitions>

            <!--  左侧: 轴参数  -->
            <StackPanel Grid.Column="0" VerticalAlignment="Top">
                <!--  X inc  -->
                <StackPanel Orientation="Horizontal">
                    <Border Style="{StaticResource GreenValueBox}">
                        <TextBlock
                            HorizontalAlignment="Right"
                            FontSize="13"
                            FontWeight="Bold"
                            Foreground="Black"
                            Text="260663" />
                    </Border>
                    <TextBlock
                        VerticalAlignment="Center"
                        FontSize="13"
                        FontWeight="SemiBold"
                        Foreground="#333333"
                        Text="X inc" />
                </StackPanel>
                <!--  Y inc  -->
                <StackPanel Orientation="Horizontal">
                    <Border Style="{StaticResource GreenValueBox}">
                        <TextBlock
                            HorizontalAlignment="Right"
                            FontSize="13"
                            FontWeight="Bold"
                            Foreground="Black"
                            Text="149584" />
                    </Border>
                    <TextBlock
                        VerticalAlignment="Center"
                        FontSize="13"
                        FontWeight="SemiBold"
                        Foreground="#333333"
                        Text="Y inc" />
                </StackPanel>
                <!--  Z inc  -->
                <StackPanel Orientation="Horizontal">
                    <Border Style="{StaticResource GreenValueBox}">
                        <TextBlock
                            HorizontalAlignment="Right"
                            FontSize="13"
                            FontWeight="Bold"
                            Foreground="Black"
                            Text="52150" />
                    </Border>
                    <TextBlock
                        VerticalAlignment="Center"
                        FontSize="13"
                        FontWeight="SemiBold"
                        Foreground="#333333"
                        Text="Z inc" />
                </StackPanel>
                <!--  R'/100  -->
                <StackPanel Orientation="Horizontal">
                    <Border Style="{StaticResource GreenValueBox}">
                        <TextBlock
                            HorizontalAlignment="Right"
                            FontSize="13"
                            FontWeight="Bold"
                            Foreground="Black"
                            Text="0" />
                    </Border>
                    <TextBlock
                        VerticalAlignment="Center"
                        FontSize="13"
                        FontWeight="SemiBold"
                        Foreground="#333333"
                        Text="R'/100" />
                </StackPanel>
                <!--  T'/100  -->
                <StackPanel Orientation="Horizontal">
                    <Border Style="{StaticResource GreenValueBox}">
                        <TextBlock
                            HorizontalAlignment="Right"
                            FontSize="13"
                            FontWeight="Bold"
                            Foreground="Black"
                            Text="0" />
                    </Border>
                    <TextBlock
                        VerticalAlignment="Center"
                        FontSize="13"
                        FontWeight="SemiBold"
                        Foreground="#333333"
                        Text="T'/100" />
                </StackPanel>
                <!--  速度1  -->
                <StackPanel Orientation="Horizontal">
                    <Border Width="67" Style="{StaticResource GrayValueBox}">
                        <TextBlock
                            HorizontalAlignment="Right"
                            FontSize="13"
                            FontWeight="Bold"
                            Foreground="Black"
                            Text="0" />
                    </Border>
                    <Border
                        Margin="0,0,0,5"
                        Padding="4,2"
                        VerticalAlignment="Center"
                        Background="#889988"
                        CornerRadius="3">
                        <Rectangle
                            Width="24"
                            Height="8"
                            Fill="#CC4444" />
                    </Border>
                </StackPanel>
                <!--  速度2  -->
                <StackPanel Orientation="Horizontal">
                    <Border Style="{StaticResource GreenValueBox}">
                        <TextBlock
                            HorizontalAlignment="Right"
                            FontSize="13"
                            FontWeight="Bold"
                            Foreground="Black"
                            Text="0" />
                    </Border>
                    <Border
                        Margin="0,0,0,5"
                        Padding="4,2"
                        VerticalAlignment="Center"
                        Background="#889988"
                        CornerRadius="3">
                        <Rectangle
                            Width="24"
                            Height="8"
                            Fill="#CC4444" />
                    </Border>
                </StackPanel>
            </StackPanel>

            <!--  中间: 缩放按钮  -->
            <StackPanel
                Grid.Column="1"
                Margin="8,0,8,0"
                VerticalAlignment="Top">
                <Button
                    Width="44"
                    Height="44"
                    Margin="0,0,0,4"
                    Background="#D0D0D0"
                    BorderBrush="#A0A0A0"
                    Content="🔍+"
                    Cursor="Hand"
                    FontSize="14"
                    RenderTransformOrigin="5.179,0.786"
                    ToolTip="放大" />
                <Ellipse
                    Width="36"
                    Height="36"
                    Margin="2,8,2,8"
                    Fill="#B0B0B0"
                    Stroke="#909090"
                    StrokeThickness="1" />
                <Button
                    Width="44"
                    Height="44"
                    Margin="0,4,0,0"
                    Background="#D0D0D0"
                    BorderBrush="#A0A0A0"
                    Content="🔍−"
                    Cursor="Hand"
                    FontSize="14"
                    ToolTip="缩小" />
            </StackPanel>

            <!--  右侧: 方向控制十字键  -->
            <Grid
                Grid.Column="2"
                Margin="0,4,0,0"
                HorizontalAlignment="Center"
                VerticalAlignment="Top">
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto" />
                    <ColumnDefinition Width="Auto" />
                    <ColumnDefinition Width="Auto" />
                </Grid.ColumnDefinitions>

                <!--  上  -->
                <Button
                    Grid.Row="0"
                    Grid.Column="1"
                    Width="44"
                    Height="44"
                    Background="#D0D0D0"
                    BorderBrush="#A0A0A0"
                    Content="⇧"
                    Cursor="Hand"
                    FontSize="22"
                    Foreground="#888888"
                    ToolTip="上移" />

                <!--  左  -->
                <Button
                    Grid.Row="1"
                    Grid.Column="0"
                    Width="44"
                    Height="44"
                    Background="#D0D0D0"
                    BorderBrush="#A0A0A0"
                    Content="⇦"
                    Cursor="Hand"
                    FontSize="22"
                    Foreground="#888888"
                    ToolTip="左移" />
                <!--  中心  -->
                <Ellipse
                    Grid.Row="1"
                    Grid.Column="1"
                    Width="36"
                    Height="36"
                    HorizontalAlignment="Center"
                    VerticalAlignment="Center"
                    Fill="#A8A8A8"
                    Stroke="#888888"
                    StrokeThickness="2" />
                <!--  右  -->
                <Button
                    Grid.Row="1"
                    Grid.Column="2"
                    Width="44"
                    Height="44"
                    Background="#D0D0D0"
                    BorderBrush="#A0A0A0"
                    Content="⇨"
                    Cursor="Hand"
                    FontSize="22"
                    Foreground="#888888"
                    ToolTip="右移" />
                <!--  下  -->
                <Button
                    Grid.Row="2"
                    Grid.Column="1"
                    Width="44"
                    Height="44"
                    Background="#D0D0D0"
                    BorderBrush="#A0A0A0"
                    Content="⇩"
                    Cursor="Hand"
                    FontSize="22"
                    Foreground="#888888"
                    ToolTip="下移" />

            </Grid>
        </Grid>

        <!--  底部工具栏  -->
        <StackPanel
            Grid.Row="2"
            Margin="8,4,8,6"
            HorizontalAlignment="Right"
            Orientation="Horizontal">
            <Button
                Width="36"
                Height="28"
                Margin="0,0,4,0"
                Background="#D8D8D8"
                BorderBrush="#A0A0A0"
                Content="🔬"
                Cursor="Hand"
                FontSize="14"
                ToolTip="显微镜" />
            <Button
                Width="36"
                Height="28"
                Margin="0,0,4,0"
                Background="#D8D8D8"
                BorderBrush="#A0A0A0"
                Content="💾"
                Cursor="Hand"
                FontSize="14"
                ToolTip="保存" />
            <Button
                Width="36"
                Height="28"
                Background="#D8D8D8"
                BorderBrush="#A0A0A0"
                Content="📂"
                Cursor="Hand"
                FontSize="14"
                ToolTip="打开" />
        </StackPanel>
    </Grid>
</UserControl>
