aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Scripting/Tango.Scripting.IDE/Themes/ButtonStyle.xaml
blob: f30adc85d629add8d41488841914c87168b5108e (plain)
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
73
74
75
76
77
78
79
80
81
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:local="clr-namespace:Tango.Scripting.IDE.Themes">

    <Style x:Key="FocusVisual">
        <Setter Property="Control.Template">
            <Setter.Value>
                <ControlTemplate>
                    <Rectangle Margin="2" SnapsToDevicePixels="true" Stroke="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" StrokeThickness="1" StrokeDashArray="1 2"/>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="TangoButtonStyle" TargetType="{x:Type Button}">
        <Setter Property="FocusVisualStyle" Value="{StaticResource FocusVisual}"/>
        <Setter Property="Background" Value="{DynamicResource Button.Static.Background}"/>
        <Setter Property="BorderBrush" Value="{DynamicResource Button.Static.Border}"/>
        <Setter Property="Foreground" Value="{DynamicResource ControlForegroundKey}"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="HorizontalContentAlignment" Value="Center"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="Padding" Value="1"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Button}">
                    <Border x:Name="border" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" SnapsToDevicePixels="true">
                        <ContentPresenter x:Name="contentPresenter" Focusable="False" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsDefaulted" Value="true">
                            <Setter Property="BorderBrush" TargetName="border" Value="{DynamicResource Button.MouseOver.Border}"/>
                        </Trigger>
                        <Trigger Property="IsMouseOver" Value="true">
                            <Setter Property="BorderBrush" TargetName="border" Value="{DynamicResource Button.MouseOver.Border}"/>
                        </Trigger>
                        <Trigger Property="IsPressed" Value="true">
                            <Setter Property="Background" TargetName="border" Value="{DynamicResource Button.Pressed.Background}"/>
                            <Setter Property="BorderBrush" TargetName="border" Value="{DynamicResource Button.Pressed.Border}"/>
                        </Trigger>
                        <Trigger Property="IsEnabled" Value="false">
                            <Setter Property="Background" TargetName="border" Value="{DynamicResource Button.Disabled.Background}"/>
                            <Setter Property="BorderBrush" TargetName="border" Value="{DynamicResource Button.Disabled.Border}"/>
                            <Setter Property="TextElement.Foreground" TargetName="contentPresenter" Value="{DynamicResource Button.Disabled.Foreground}"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="TangoToolBarButtonStyle" TargetType="{x:Type Button}">
        <Setter Property="Width" Value="26"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Button}">
                    <Border x:Name="border" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" SnapsToDevicePixels="true">
                        <Grid>
                            <Rectangle x:Name="background"  Fill="Transparent" Opacity="1"/>
                            <ContentPresenter x:Name="contentPresenter" Focusable="False" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
                        </Grid>
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsDefaulted" Value="true">
                            <Setter Property="BorderBrush" TargetName="border" Value="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}"/>
                        </Trigger>
                        <Trigger Property="IsMouseOver" Value="true">
                            <Setter Property="Fill" TargetName="background" Value="{DynamicResource Toolbar.Button.MaouseMove.Background}"/>
                        </Trigger>
                        <Trigger Property="IsPressed" Value="true">
                            <Setter Property="Fill" TargetName="background" Value="{DynamicResource ControlBrushColorKey}"/>
                        </Trigger>
                        <Trigger Property="IsEnabled" Value="false">
                            <Setter Property="Background" TargetName="border" Value="{DynamicResource Button.Disabled.Background}"/>
                            <Setter Property="BorderBrush" TargetName="border" Value="{DynamicResource Button.Disabled.Border}"/>
                            <Setter Property="TextElement.Foreground" TargetName="contentPresenter" Value="{DynamicResource Button.Disabled.Foreground}"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
</ResourceDictionary>
" Color="{StaticResource WhiteColor}" /> </LinearGradientBrush> <!-- Foreground --> <SolidColorBrush x:Key="Foreground" Color="#FFFFFF" options:Freeze="True" /> <SolidColorBrush x:Key="WindowTitleForeground" Color="#999988" options:Freeze="True" /> <!-- General --> <SolidColorBrush x:Key="BackgroundHighlighted" Color="#54545C" options:Freeze="True" /> <SolidColorBrush x:Key="BorderBrushHighlighted" Color="#6A6A75" options:Freeze="True" /> <SolidColorBrush x:Key="BackgroundSelected" Color="#007ACC" options:Freeze="True" /> <SolidColorBrush x:Key="BorderBrushSelected" Color="#1C97EA" options:Freeze="True" /> <SolidColorBrush x:Key="BackgroundNormal" Color="#3F3F46" options:Freeze="True" /> <SolidColorBrush x:Key="BorderBrushNormal" Color="#54545C" options:Freeze="True" /> <SolidColorBrush x:Key="WindowGlowBrush" Color="#017ACC" options:Freeze="True" /> <!-- Text Box --> <SolidColorBrush x:Key="TextBoxBackground" Color="#333337" options:Freeze="True" /> <SolidColorBrush x:Key="TextBoxBackgroundSelected" Color="#3F3F46" options:Freeze="True" /> <!-- Search Text Box --> <SolidColorBrush x:Key="SearchTextForeground" Color="#999999" options:Freeze="True" /> <!-- Link Button --> <SolidColorBrush x:Key="LinkButtonForeground" Color="#1297FB" options:Freeze="True" /> <SolidColorBrush x:Key="LinkButtonForegroundHighlighted" Color="#55AAFF" options:Freeze="True" /> <!-- Close Button --> <SolidColorBrush x:Key="CloseButtonBackgroundHighlighted" Color="#39ADFB" options:Freeze="True" /> <SolidColorBrush x:Key="CloseButtonBackgroundPressed" Color="#084E7D" options:Freeze="True" /> <SolidColorBrush x:Key="CloseButtonStroke" Color="#AAFFFFFF" options:Freeze="True" /> <SolidColorBrush x:Key="CloseButtonStrokeHighlighted" Color="#FFFFFF" options:Freeze="True" /> <!-- Menu --> <SolidColorBrush x:Key="MenuSeparatorBorderBrush" Color="#333337" options:Freeze="True" /> <SolidColorBrush x:Key="MenuItemHighlightedBackground" Color="#3E3E40" options:Freeze="True" /> <SolidColorBrush x:Key="SubmenuItemBackground" Color="#1B1B1C" options:Freeze="True" /> <SolidColorBrush x:Key="SubmenuItemBackgroundHighlighted" Color="#333334" options:Freeze="True" /> <SolidColorBrush x:Key="MenuDisabledForeground" Color="#656565" options:Freeze="True" /> <!-- Scroll Bar --> <SolidColorBrush x:Key="ScrollBarPageButtonBackgroundHighlighted" Color="#05FFFFFF" options:Freeze="True" /> <!-- Notification Button --> <SolidColorBrush x:Key="NotificationButtonForegroundBrush" Color="#000000" /> <SolidColorBrush x:Key="NotificationButtonBackgroundBrush" Color="#FFCC00" /> <SolidColorBrush x:Key="NotificationButtonBackgroundOverBrush" Color="#FFDF66" /> <SolidColorBrush x:Key="NotificationButtonBackgroundPressedBrush" Color="#C59E00" /> <!-- Quick Launch TextBox --> <SolidColorBrush x:Key="QuickLaunchTextBoxBorderBrush" Color="#3F3F46" /> <SolidColorBrush x:Key="QuickLaunchTextBoxFocusedBorderBrush" Color="#007ACC" /> <SolidColorBrush x:Key="HoverBackgroundBrush" Color="Red" options:Freeze="True" /> </ResourceDictionary>