SectionStyle2.xaml 7.19 KB
Newer Older
1 2 3 4 5 6 7
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:iconPacks="http://metro.mahapps.com/winfx/xaml/iconpacks">
    <ResourceDictionary.MergedDictionaries>
        <ResourceDictionary Source="pack://application:,,,/FLY.ControlLibrary;component/Themes/ButtonStyle2.xaml"/>
    </ResourceDictionary.MergedDictionaries>

    <!--参数设置界面标题背景颜色-->
8 9
    <SolidColorBrush x:Key="Brushes.TitleBar.Background" Color="{StaticResource Colors.Accent}"/>
    <SolidColorBrush x:Key="Brushes.TitleBar.Foreground" Color="{StaticResource Colors.ThemeBackground}"/>
10 11 12 13 14 15 16
    
    <!-- 参数设置页 每个section 的标题框 内的标题-->
    <Style TargetType="TextBlock" x:Key="Styles.ParamSection.Text">
        <Setter Property="Margin" Value="5"/>
        <Setter Property="Foreground"  Value="White" />
        <Setter Property="FontWeight"  Value="Bold" />
        <Setter Property="FontSize"  Value="30" />
17
        <Setter Property="FontFamily"  Value="{StaticResource FontFamily.Field}" />
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46
        <Setter Property="TextAlignment"  Value="Right" />
    </Style>
    
    <!-- 参数设置页 每个section 的标题框 -->
    <Style TargetType="Border" x:Key="Styles.ParamSection.Border">
        <Setter Property="Width" Value="150"/>
        <Setter Property="Background" Value="{StaticResource Brushes.Activity}"/>
        <Setter Property="Margin" Value="0,5,5,5"/>
        <Style.Resources>
            <Style TargetType="TextBlock" BasedOn="{StaticResource Styles.ParamSection.Text}"/>
        </Style.Resources>
    </Style>

    <!-- 参数设置页 可点击的 section 的标题框 -->
    <Style TargetType="{x:Type Button}" x:Key="Styles.ParamSection.Button" BasedOn="{StaticResource Styles.Button3}">
        <Setter Property="Width" Value="150"/>
        <Setter Property="Margin" Value="0,5,5,5"/>
        <Style.Resources>
            <Style TargetType="TextBlock" BasedOn="{StaticResource Styles.ParamSection.Text}"/>
        </Style.Resources>
    </Style>

    
    <!-- 参数页标题 -->
    <Style TargetType="TextBlock" x:Key="Styles.TitleBar.Text">
        <Setter Property="Margin"  Value="160,0,0,0" />
        <Setter Property="Foreground"  Value="White" />
        <Setter Property="FontWeight"  Value="Bold" />
        <Setter Property="FontSize"  Value="60" />
47
        <Setter Property="FontFamily"  Value="Microsoft Sans Serif" />
48 49 50
        <Setter Property="TextAlignment"  Value="Left" />
        <Setter Property="VerticalAlignment"  Value="Center" />
    </Style>
51 52 53
    <Style TargetType="TextBlock" x:Key="Styles.TitleBar.Text2" BasedOn="{StaticResource Styles.TitleBar.Text}">
        <Setter Property="Foreground"  Value="Black" />
    </Style>
潘栩锋's avatar
潘栩锋 committed
54 55 56 57 58 59 60
    <!-- 参数页副标题 -->
    <Style TargetType="TextBlock" x:Key="Styles.TitleBar.Text.Sub" BasedOn="{StaticResource Styles.TitleBar.Text}">
        <Setter Property="Foreground"  Value="LightGray" />
        <Setter Property="VerticalAlignment"  Value="Bottom" />
        <Setter Property="Margin"  Value="5,0" />
        <Setter Property="FontSize"  Value="30" />
    </Style>
61
    <!--标题区,左边的后退键(蓝底白图标)-->
62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90
    <Style TargetType="Button" x:Key="Styles.TitleBar.BackButton" >

        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Button}">
                    <Border 
                        BorderBrush="{TemplateBinding BorderBrush}" 
                        BorderThickness="{TemplateBinding BorderThickness}" 
                        Background="{TemplateBinding Background}" 
                        Height="{TemplateBinding Height}" 
                        Width="{TemplateBinding Width}"
                        >
                        <iconPacks:PackIconMaterial Kind="ArrowLeftThick" />
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsKeyboardFocused" Value="true">
                        </Trigger>
                        <Trigger Property="IsEnabled" Value="false">
                        </Trigger>
                        <Trigger Property="IsPressed" Value="true">
                            <Setter Property="Opacity" Value="0.5"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="Background" Value="Transparent"/>
        <Setter Property="BorderBrush" Value="Transparent"/>

91 92 93 94 95
        <Setter Property="Width" Value="80"/>
        <Setter Property="Height" Value="80"/>
        <Setter Property="Margin" Value="0,24"/>
        <Setter Property="Foreground" Value="{StaticResource Brushes.TitleBar.Foreground}"/>
        <Setter Property="Background" Value="{StaticResource Brushes.TitleBar.Background}"/>
96 97 98 99 100 101 102 103 104 105

        <Style.Resources>
            <Style TargetType="iconPacks:PackIconMaterial" >
                <Setter Property="Width" Value="60"/>
                <Setter Property="Height" Value="Auto" />
                <Setter Property="HorizontalAlignment" Value="Right" />
                <Setter Property="VerticalAlignment" Value="Center" />
                <Setter Property="Margin" Value="0" />
            </Style>
        </Style.Resources>
106 107
    </Style>

潘栩锋's avatar
潘栩锋 committed
108 109


110 111 112 113 114
    <!--标题区,左边的后退键(白底蓝图标)-->
    <Style TargetType="Button" x:Key="Styles.TitleBar.BackButton2" BasedOn="{StaticResource Styles.TitleBar.BackButton}">
        <Setter Property="Foreground" Value="{StaticResource Brushes.TitleBar.Background}"/>
        <Setter Property="Background" Value="{StaticResource Brushes.TitleBar.Foreground}"/>
    </Style>
潘栩锋's avatar
潘栩锋 committed
115 116 117 118 119 120 121

    <!--标题区,左边的后退键(蓝底白图标) 小-->
    <Style TargetType="Button" x:Key="Styles.TitleBar.BackButton3" BasedOn="{StaticResource Styles.Button.Empty}">
        <Setter Property="Margin" Value="0,10"/>
        <Setter Property="Foreground" Value="{StaticResource Brushes.TitleBar.Foreground}"/>
        <Setter Property="Background" Value="{StaticResource Brushes.TitleBar.Background}"/>
        <Setter Property="Width" Value="60"/>
122
        <Setter Property="Height" Value="60"/>
潘栩锋's avatar
潘栩锋 committed
123 124
        <Setter Property="Content">
            <Setter.Value>
125
                <iconPacks:PackIconMaterial Kind="ArrowLeftBold"/>
潘栩锋's avatar
潘栩锋 committed
126 127
            </Setter.Value>
        </Setter>
128 129 130 131 132 133 134 135 136
        <Style.Resources>
            <Style TargetType="iconPacks:PackIconMaterial" >
                <Setter Property="Width" Value="30"/>
                <Setter Property="Height" Value="Auto" />
                <Setter Property="HorizontalAlignment" Value="Center" />
                <Setter Property="VerticalAlignment" Value="Center" />
                <Setter Property="SnapsToDevicePixels" Value="True" />
            </Style>
        </Style.Resources>
潘栩锋's avatar
潘栩锋 committed
137
    </Style>
138
    
潘栩锋's avatar
潘栩锋 committed
139 140 141 142 143 144
    <!--标题区,左边的后退键(白底蓝图标) 小-->
    <Style TargetType="Button" x:Key="Styles.TitleBar.BackButton4" BasedOn="{StaticResource Styles.TitleBar.BackButton3}">
        <Setter Property="Foreground" Value="{StaticResource Brushes.TitleBar.Background}"/>
        <Setter Property="Background" Value="{StaticResource Brushes.TitleBar.Foreground}"/>
    </Style>

145
</ResourceDictionary>