<UserControl
    x:Class="XplorePlane.Views.RaySourcePanelView"
    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"
    xmlns:rayViews="clr-namespace:XP.Hardware.RaySource.Views;assembly=XP.Hardware.RaySource"
    d:DesignHeight="100"
    d:DesignWidth="300"
    mc:Ignorable="d">
    <Grid Background="#F5F5F5">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />

        </Grid.RowDefinitions>

        <!--  顶部: 标签页 + 状态指示  -->
        <Grid Grid.Row="0" Background="#E0E0E0">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto" />
                <ColumnDefinition Width="*" />
            </Grid.ColumnDefinitions>
            <!--  标签页  -->
            <StackPanel Grid.Column="0" Orientation="Horizontal">

                <TextBlock
                    Margin="8,4"
                    HorizontalAlignment="Left"
                    VerticalAlignment="Center"
                    FontWeight="SemiBold"
                    Foreground="#333333"
                    Text="射线源" />



            </StackPanel>
            <!--  X-Ray ON 状态  -->
            <Border
                Grid.Column="1"
                Margin="8,3,8,3"
                Padding="8,2"
                HorizontalAlignment="Right"
                Background="#4CAF50"
                CornerRadius="2">
                <TextBlock
                    HorizontalAlignment="Center"
                    VerticalAlignment="Center"
                    FontWeight="SemiBold"
                    Foreground="White"
                    Text="X-Ray ON" />
            </Border>
        </Grid>

        <!--  中间: Voltage / Power + ON/OFF  -->
        <Border
            Grid.Row="1"
            Padding="8,6"
            Background="#F0F0F0"
            BorderBrush="#CCCCCC"
            BorderThickness="0,1,0,1">
            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="*" />
                    <ColumnDefinition Width="Auto" />
                </Grid.ColumnDefinitions>

                <!--  Voltage / Power 参数  -->
                <Grid Grid.Column="0">
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto" />
                        <RowDefinition Height="Auto" />
                    </Grid.RowDefinitions>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto" />
                        <ColumnDefinition Width="60" />
                        <ColumnDefinition Width="Auto" />
                    </Grid.ColumnDefinitions>

                    <TextBlock
                        Grid.Row="0"
                        Grid.Column="0"
                        Margin="0,0,6,2"
                        VerticalAlignment="Center"
                        FontStyle="Italic"
                        Foreground="#555555"
                        Text="电压" />
                    <TextBox
                        Grid.Row="0"
                        Grid.Column="1"
                        Margin="0,0,4,2"
                        Padding="2"
                        VerticalContentAlignment="Center"
                        Text="100"
                        TextAlignment="Right" />
                    <TextBlock
                        Grid.Row="0"
                        Grid.Column="2"
                        Margin="0,0,0,2"
                        VerticalAlignment="Center"
                        Foreground="#555555"
                        Text="kV" />

                    <TextBlock
                        Grid.Row="1"
                        Grid.Column="0"
                        Margin="0,0,6,0"
                        VerticalAlignment="Center"
                        FontStyle="Italic"
                        Foreground="#555555"
                        Text="功率" />
                    <TextBox
                        Grid.Row="1"
                        Grid.Column="1"
                        Margin="0,0,4,0"
                        Padding="2"
                        VerticalContentAlignment="Center"
                        Text="1.30"
                        TextAlignment="Right" />
                    <TextBlock
                        Grid.Row="1"
                        Grid.Column="2"
                        VerticalAlignment="Center"
                        Foreground="#555555"
                        Text="W" />
                </Grid>

                <!--  ON / OFF 按钮  -->
                <StackPanel
                    Grid.Column="1"
                    Margin="10,0,0,0"
                    VerticalAlignment="Center"
                    Orientation="Horizontal">
                    <Button
                        Width="50"
                        Height="30"
                        Margin="0,0,4,0"
                        Content="ON"
                        FontSize="13"
                        FontWeight="Bold" />
                    <Button
                        Width="50"
                        Height="30"
                        Content="OFF"
                        FontSize="13"
                        FontWeight="Bold" />
                </StackPanel>
            </Grid>
        </Border>


    </Grid>
</UserControl>
