<!--
NavisworksTransport 共享样式资源字典 - Navisworks 2026风格
功能说明：
1. 统一管理所有UI组件的样式定义
2. 保持与Navisworks 2026风格一致的设计
3. 简化样式维护和修改

设计原则：蓝色主题配色，现代化布局，统一字体
-->
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">

    <!-- Navisworks 2026 主要颜色定义 -->
    <Color x:Key="NavisworksPrimaryBlue">#FF2B579A</Color>
    <Color x:Key="NavisworksSecondaryBlue">#FF4472C4</Color>
    <Color x:Key="NavisworksLightBlue">#FFD4E7FF</Color>
    <Color x:Key="NavisworksBackgroundBlue">#FFF8FBFF</Color>
    <Color x:Key="NavisworksButtonBlue">#FFE7F1FF</Color>
    <Color x:Key="NavisworksTextGray">#FF666666</Color>
    <Color x:Key="NavisworksDarkGray">#FF333333</Color>

    <!-- Navisworks 2026 画刷定义 -->
    <SolidColorBrush x:Key="NavisworksPrimaryBrush" Color="{StaticResource NavisworksPrimaryBlue}"/>
    <SolidColorBrush x:Key="NavisworksSecondaryBrush" Color="{StaticResource NavisworksSecondaryBlue}"/>
    <SolidColorBrush x:Key="NavisworksLightBrush" Color="{StaticResource NavisworksLightBlue}"/>
    <SolidColorBrush x:Key="NavisworksBackgroundBrush" Color="{StaticResource NavisworksBackgroundBlue}"/>
    <SolidColorBrush x:Key="NavisworksButtonBrush" Color="{StaticResource NavisworksButtonBlue}"/>
    <SolidColorBrush x:Key="NavisworksTextBrush" Color="{StaticResource NavisworksTextGray}"/>
    <SolidColorBrush x:Key="NavisworksDarkBrush" Color="{StaticResource NavisworksDarkGray}"/>

    <!-- 区域标题样式 -->
    <Style x:Key="SectionHeaderStyle" TargetType="Label">
        <Setter Property="FontWeight" Value="Normal"/>
        <Setter Property="FontSize" Value="12"/>
        <Setter Property="Foreground" Value="{StaticResource NavisworksPrimaryBrush}"/>
    </Style>

    <!-- 主要操作按钮样式 -->
    <Style x:Key="ActionButtonStyle" TargetType="Button">
        <Setter Property="Background" Value="{StaticResource NavisworksSecondaryBrush}"/>
        <Setter Property="Foreground" Value="White"/>
        <Setter Property="BorderBrush" Value="{StaticResource NavisworksPrimaryBrush}"/>
        <Setter Property="Margin" Value="0,0,10,0"/>
        <Setter Property="Padding" Value="5,0"/>
        <Setter Property="MinWidth" Value="50"/>
        <Setter Property="Height" Value="24"/>
    </Style>

    <!-- 次要操作按钮样式 -->
    <Style x:Key="SecondaryButtonStyle" TargetType="Button">
        <Setter Property="Background" Value="{StaticResource NavisworksButtonBrush}"/>
        <Setter Property="Foreground" Value="{StaticResource NavisworksPrimaryBrush}"/>
        <Setter Property="BorderBrush" Value="{StaticResource NavisworksSecondaryBrush}"/>
        <Setter Property="Margin" Value="0,0,10,0"/>
        <Setter Property="Padding" Value="5,0"/>
        <Setter Property="MinWidth" Value="50"/>
        <Setter Property="Height" Value="24"/>
    </Style>

    <!-- 状态文本样式 -->
    <Style x:Key="StatusTextStyle" TargetType="TextBlock">
        <Setter Property="FontSize" Value="10"/>
        <Setter Property="Foreground" Value="{StaticResource NavisworksTextBrush}"/>
        <Setter Property="TextWrapping" Value="Wrap"/>
    </Style>

    <!-- 参数标签样式 -->
    <Style x:Key="ParameterLabelStyle" TargetType="Label">
        <Setter Property="VerticalAlignment" Value="Center"/>
        <Setter Property="MinWidth" Value="40"/>
    </Style>

    <!-- 参数输入框样式 -->
    <Style x:Key="ParameterInputStyle" TargetType="TextBox">
        <Setter Property="VerticalAlignment" Value="Center"/>
        <Setter Property="MinWidth" Value="40"/>
    </Style>

    <!-- 信息文本样式 -->
    <Style x:Key="InfoTextStyle" TargetType="Label">
        <Setter Property="FontSize" Value="10"/>
        <Setter Property="Foreground" Value="{StaticResource NavisworksTextBrush}"/>
        <Setter Property="VerticalAlignment" Value="Center"/>
    </Style>

    <!-- 单位标签样式 -->
    <Style x:Key="UnitLabelStyle" TargetType="Label">
        <Setter Property="MinWidth" Value="30"/>
        <Setter Property="VerticalAlignment" Value="Center"/>
        <Setter Property="FontSize" Value="10"/>
        <Setter Property="Foreground" Value="{StaticResource NavisworksTextBrush}"/>
    </Style>

    <!-- 只读文本框样式 -->
    <Style x:Key="ReadOnlyTextBoxStyle" TargetType="TextBox">
        <Setter Property="IsReadOnly" Value="True"/>
        <Setter Property="Background" Value="#FFF5F5F5"/>
        <Setter Property="BorderBrush" Value="#FFCCCCCC"/>
        <Setter Property="Padding" Value="5,3"/>
        <Setter Property="Height" Value="24"/>
    </Style>

    <!-- TabControl样式定义 -->
    <Style x:Key="NavisworksTabControlStyle" TargetType="TabControl">
        <Setter Property="Background" Value="White"/>
        <Setter Property="BorderBrush" Value="{StaticResource NavisworksLightBrush}"/>
        <Setter Property="BorderThickness" Value="1"/>
    </Style>

    <!-- TabItem样式定义 -->
    <Style x:Key="NavisworksTabItemStyle" TargetType="TabItem">
        <Setter Property="Background" Value="{StaticResource NavisworksBackgroundBrush}"/>
        <Setter Property="BorderBrush" Value="{StaticResource NavisworksLightBrush}"/>
        <Setter Property="BorderThickness" Value="1,1,1,0"/>
        <Setter Property="Margin" Value="0,0,2,0"/>
        <Setter Property="Padding" Value="12,6"/>
        <Setter Property="FontWeight" Value="Normal"/>
        <Setter Property="Foreground" Value="{StaticResource NavisworksPrimaryBrush}"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="TabItem">
                    <Border Name="Border" 
                            Background="{TemplateBinding Background}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            CornerRadius="0">
                        <ContentPresenter ContentSource="Header" 
                                          Margin="{TemplateBinding Padding}"
                                          HorizontalAlignment="Center"
                                          VerticalAlignment="Center"/>
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsSelected" Value="True">
                            <Setter TargetName="Border" Property="Background" Value="White"/>
                            <Setter Property="Foreground" Value="{StaticResource NavisworksPrimaryBrush}"/>
                            <Setter Property="FontWeight" Value="Normal"/>
                        </Trigger>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter TargetName="Border" Property="Background" Value="{StaticResource NavisworksButtonBrush}"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!-- 对话框专用样式 -->
    <Style x:Key="DialogTitleStyle" TargetType="Label">
        <Setter Property="FontWeight" Value="Normal"/>
        <Setter Property="FontSize" Value="18"/>
        <Setter Property="Foreground" Value="{StaticResource NavisworksPrimaryBrush}"/>
        <Setter Property="HorizontalAlignment" Value="Center"/>
        <Setter Property="Padding" Value="0,10,0,8"/>
    </Style>

    <Style x:Key="DialogVersionStyle" TargetType="Label">
        <Setter Property="FontWeight" Value="Normal"/>
        <Setter Property="FontSize" Value="14"/>
        <Setter Property="Foreground" Value="{StaticResource NavisworksSecondaryBrush}"/>
        <Setter Property="HorizontalAlignment" Value="Center"/>
        <Setter Property="Padding" Value="0,5,0,5"/>
    </Style>

    <Style x:Key="DialogInfoLabelStyle" TargetType="Label">
        <Setter Property="FontWeight" Value="Normal"/>
        <Setter Property="FontSize" Value="11"/>
        <Setter Property="Foreground" Value="{StaticResource NavisworksPrimaryBrush}"/>
        <Setter Property="Width" Value="80"/>
        <Setter Property="Padding" Value="0,4"/>
    </Style>

    <Style x:Key="DialogInfoTextStyle" TargetType="TextBlock">
        <Setter Property="FontSize" Value="11"/>
        <Setter Property="Foreground" Value="{StaticResource NavisworksDarkBrush}"/>
        <Setter Property="VerticalAlignment" Value="Center"/>
        <Setter Property="TextWrapping" Value="Wrap"/>
        <Setter Property="Margin" Value="10,0"/>
    </Style>

    <Style x:Key="DialogDescriptionStyle" TargetType="TextBlock">
        <Setter Property="FontSize" Value="11"/>
        <Setter Property="Foreground" Value="{StaticResource NavisworksTextBrush}"/>
        <Setter Property="TextWrapping" Value="Wrap"/>
        <Setter Property="TextAlignment" Value="Center"/>
        <Setter Property="LineHeight" Value="16"/>
        <Setter Property="Margin" Value="20,15"/>
    </Style>

    <Style x:Key="DialogContentTextStyle" TargetType="TextBlock">
        <Setter Property="FontSize" Value="11"/>
        <Setter Property="Foreground" Value="{StaticResource NavisworksDarkBrush}"/>
        <Setter Property="TextWrapping" Value="Wrap"/>
        <Setter Property="LineHeight" Value="16"/>
        <Setter Property="Margin" Value="10,2,0,4"/>
    </Style>

    <!-- 复制图标几何图形 (标准两页重叠效果) -->
    <Geometry x:Key="CopyIconGeometry">
        M16,1H4C2.9,1 2,1.9 2,3V17H4V3H16V1ZM19,5H8C6.9,5 6,5.9 6,7V21C6,22.1 6.9,23 8,23H19C20.1,23 21,22.1 21,21V7C21,5.9 20.1,5 19,5ZM19,21H8V7H19V21Z
    </Geometry>

    <!-- 粘贴图标几何图形 (标准剪贴板样式) -->
    <Geometry x:Key="PasteIconGeometry">
        M17,3H14.76C14.37,1.69 13.17,0.75 11.75,0.75C10.33,0.75 9.13,1.69 8.74,3H6.5C5.12,3 4,4.12 4,5.5V19.5C4,20.88 5.12,22 6.5,22H17C18.38,22 19.5,20.88 19.5,19.5V5.5C19.5,4.12 18.38,3 17,3ZM11.75,3C12.16,3 12.5,3.34 12.5,3.75C12.5,4.16 12.16,4.5 11.75,4.5C11.34,4.5 11,4.16 11,3.75C11,3.34 11.34,3 11.75,3ZM17,19.5H6.5V5.5H8.75V7.25H14.75V5.5H17V19.5Z
    </Geometry>

        <!-- 旋转图标按钮 (Material Refresh) -->
    <Geometry x:Key="RotateIconGeometry">
        M17.65,6.35C16.2,4.9 14.21,4 12,4C7.58,4 4.01,7.58 4.01,12C4.01,16.42 7.58,20 12,20C15.73,20 18.84,17.45 19.73,14H17.65C16.83,16.33 14.61,18 12,18C8.69,18 6,15.31 6,12C6,8.69 8.69,6 12,6C13.66,6 15.14,6.69 16.22,7.78L13,11H20V4L17.65,6.35Z
    </Geometry>

    <!-- L形转角图标 (过弯检测) -->
    <Geometry x:Key="CornerCheckIconGeometry">M2,18 L2,4 L16,4 L16,2 M4,16 L4,6 L14,6 M7,12 L7,8 L11,8 L11,12 Z</Geometry>

    <!-- 包围盒图标 (水平直尺 + 旋转45度) -->
    <Geometry x:Key="BoundingBoxIconGeometry">M2,5 L18,5 L18,15 L2,15 Z M4,5 L4,3 M7,5 L7,2 M10,5 L10,3 M13,5 L13,2 M16,5 L16,3</Geometry>

    <!-- 靶心/准心图标 (测量工具) -->
    <Geometry x:Key="TargetIconGeometry">
        M12,2C6.48,2 2,6.48 2,12C2,17.52 6.48,22 12,22C17.52,22 22,17.52 22,12C22,6.48 17.52,2 12,2ZM12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20,12C20,16.41 16.41,20 12,20ZM12,6C8.69,6 6,8.69 6,12C6,15.31 8.69,18 12,18C15.31,18 18,15.31 18,12C18,8.69 15.31,6 12,6ZM12,16C9.79,16 8,14.21 8,12C8,9.79 9.79,8 12,8C14.21,8 16,9.79 16,12C16,14.21 14.21,16 12,16Z
    </Geometry>

    <!-- 检测记录标签样式（居中） -->
    <Style x:Key="CenterLabelStyle" TargetType="TextBlock">
        <Setter Property="FontWeight" Value="Normal"/>
        <Setter Property="FontSize" Value="11"/>
        <Setter Property="Foreground" Value="{StaticResource NavisworksSecondaryBrush}"/>
        <Setter Property="HorizontalAlignment" Value="Center"/>
    </Style>

    <!-- 检测记录数值样式（居中） -->
    <Style x:Key="CenterValueStyle" TargetType="TextBlock">
        <Setter Property="FontWeight" Value="Bold"/>
        <Setter Property="FontSize" Value="12"/>
        <Setter Property="Foreground" Value="{StaticResource NavisworksPrimaryBrush}"/>
        <Setter Property="HorizontalAlignment" Value="Center"/>
    </Style>

    <!-- 正方形图标按钮基础样式 -->
    <Style x:Key="IconButtonStyle" TargetType="Button">
        <Setter Property="Width" Value="24"/>
        <Setter Property="Height" Value="24"/>
        <Setter Property="Background" Value="Transparent"/>
        <Setter Property="BorderBrush" Value="#FFCCCCCC"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="Padding" Value="2"/>
        <Setter Property="Cursor" Value="Hand"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="Button">
                    <Border x:Name="border"
                            Background="{TemplateBinding Background}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            CornerRadius="2">
                        <ContentPresenter HorizontalAlignment="Center" 
                                          VerticalAlignment="Center"
                                          Margin="{TemplateBinding Padding}"/>
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter TargetName="border" Property="Background" Value="{StaticResource NavisworksButtonBrush}"/>
                            <Setter TargetName="border" Property="BorderBrush" Value="{StaticResource NavisworksSecondaryBrush}"/>
                        </Trigger>
                        <Trigger Property="IsPressed" Value="True">
                            <Setter TargetName="border" Property="Background" Value="{StaticResource NavisworksSecondaryBrush}"/>
                            <Setter TargetName="border" Property="BorderBrush" Value="{StaticResource NavisworksPrimaryBrush}"/>
                        </Trigger>
                        <Trigger Property="IsEnabled" Value="False">
                            <Setter TargetName="border" Property="Opacity" Value="0.5"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

</ResourceDictionary>