PgMainEditGraphStyle.xaml 3.63 KB
Newer Older
潘栩锋's avatar
潘栩锋 committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 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 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72
<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:,,,/MultiLayout;component/Themes/Styles.xaml"/>
    </ResourceDictionary.MergedDictionaries>

    <ControlTemplate x:Key="picture_button" TargetType="Button">
        <Border Name="border" BorderThickness="1" CornerRadius="5">
            <ContentPresenter Content="{TemplateBinding Content}"/>
        </Border>
        <ControlTemplate.Triggers>
            <Trigger Property="IsMouseOver" Value="True">
                <Setter TargetName="border" Property="BorderBrush" Value="LightBlue"/>
            </Trigger>
            <Trigger Property="IsPressed" Value="True">
                <Setter TargetName="border" Property="Background" Value="LightGray"/>
            </Trigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>
    <SolidColorBrush x:Key="Item.MouseOver.Background" Color="Transparent"/>
    <SolidColorBrush x:Key="Item.MouseOver.Foreground" Color="White"/>
    <SolidColorBrush x:Key="Item.MouseOver.Border" Color="Black"/>

    <SolidColorBrush x:Key="Item.SelectedInactive.Background" Color="#FF3B3B3B"/>
    <SolidColorBrush x:Key="Item.SelectedInactive.Foreground" Color="White"/>
    <SolidColorBrush x:Key="Item.SelectedInactive.Border" Color="Black"/>

    <SolidColorBrush x:Key="Item.SelectedActive.Background" Color="White"/>
    <SolidColorBrush x:Key="Item.SelectedActive.Foreground" Color="Black"/>
    <SolidColorBrush x:Key="Item.SelectedActive.Border" Color="Black"/>



    <Style TargetType="{x:Type ToggleButton}" x:Key="ToggleButtonStyle_auto" >
        <Setter Property="HorizontalContentAlignment" Value="Center"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="Padding" Value="1"/>
        <Setter Property="Margin" Value="1"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ToggleButton}">
                    <Border x:Name="border" Background="#FFB0B0B0">
                        <TextBlock x:Name="textblock" 
                                           Text="*1" FontSize="15" 
                                           HorizontalAlignment="Center" VerticalAlignment="Center" 
                                           Foreground="#FF107CD6" />
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsChecked" Value="True">
                            <Setter TargetName="border" Property="Background" Value="#FF107CD6"/>
                            <Setter TargetName="textblock" Property="Text" Value="A"/>
                            <Setter TargetName="textblock" Property="Foreground" Value="White"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style TargetType="{x:Type Border}" x:Key="BorderStyle_hGridLine">
        <Setter Property="BorderThickness" Value="0,0,0,2"/>
        <Setter Property="BorderBrush" Value="Black"/>
    </Style>
    <Style TargetType="{x:Type Border}" x:Key="BorderStyle_vGridLine">
        <Setter Property="BorderThickness" Value="0,0,2,0"/>
        <Setter Property="BorderBrush" Value="Black"/>
    </Style>
    <Style TargetType="{x:Type Grid}" x:Key="GridStyle_grid">
        <Setter Property="Margin" Value="20"/>
    </Style>

</ResourceDictionary>