~halega/+junk/sharpdevelop

« back to all changes in this revision

Viewing changes to src/Main/ICSharpCode.Core.Presentation/themes/generic.xaml

  • Committer: sk
  • Date: 2011-09-10 05:17:57 UTC
  • Revision ID: halega@halega.com-20110910051757-qfouz1llya9m6boy
4.1.0.7915 Release Candidate 1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
 
2
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
 
3
        xmlns:local="clr-namespace:ICSharpCode.Core.Presentation"
 
4
>
 
5
        <Style TargetType="{x:Type Window}" x:Key="{x:Static local:GlobalStyles.WindowStyleKey}">
 
6
                <Setter Property="UseLayoutRounding" Value="True" />
 
7
                <Setter Property="TextOptions.TextFormattingMode" Value="Display" />
 
8
                <Setter Property="FlowDirection" Value="{DynamicResource {x:Static local:GlobalStyles.FlowDirectionKey}}" />
 
9
        </Style>
 
10
        
 
11
        <Style TargetType="{x:Type Window}" x:Key="{x:Static local:GlobalStyles.DialogWindowStyleKey}">
 
12
                <Setter Property="UseLayoutRounding" Value="True" />
 
13
                <Setter Property="TextOptions.TextFormattingMode" Value="Display" />
 
14
                <Setter Property="FlowDirection" Value="{DynamicResource {x:Static local:GlobalStyles.FlowDirectionKey}}" />
 
15
                <Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}" />
 
16
                <Setter Property="ShowInTaskbar" Value="False" />
 
17
        </Style>
 
18
        
 
19
        <x:StaticExtension x:Key="{x:Static local:GlobalStyles.FlowDirectionKey}" MemberType="FlowDirection" Member="LeftToRight" />
 
20
        
 
21
        <Style TargetType="{x:Type Button}" x:Key="{x:Static local:GlobalStyles.ButtonStyleKey}">
 
22
                <Setter Property="MinWidth" Value="73" />
 
23
                <!-- <Setter Property="Height" Value="21" /> height implicit using text height+padding-->
 
24
                <Setter Property="Padding" Value="9,1,9,1" />
 
25
        </Style>
 
26
        
 
27
        <Style TargetType="ToggleButton" x:Key="{x:Static local:GlobalStyles.WordWrapCheckBoxStyleKey}">
 
28
                <Setter Property="ContentTemplate">
 
29
                        <Setter.Value>
 
30
                                <DataTemplate>
 
31
                                        <AccessText Text="{Binding}" TextWrapping="WrapWithOverflow" />
 
32
                                </DataTemplate>
 
33
                        </Setter.Value>
 
34
                </Setter>
 
35
        </Style>
 
36
        
 
37
        <Style TargetType="{x:Type Image}" x:Key="{x:Static local:ToolBarService.ImageStyleKey}">
 
38
                <Style.Triggers>
 
39
                        <DataTrigger Binding="{Binding RelativeSource={RelativeSource AncestorType={x:Type ButtonBase}, AncestorLevel=1}, Path=IsEnabled}" Value="False">
 
40
                                <Setter Property="Opacity" Value="0.30" />
 
41
                        </DataTrigger>
 
42
                </Style.Triggers>
 
43
        </Style>
 
44
        
 
45
        <!-- Colors for DropDownButton and SplitButton -->
 
46
        <SolidColorBrush x:Key="{ComponentResourceKey {x:Type local:DropDownButton}, ActiveBorder}" Color="#FF0A246A"/>
 
47
        <SolidColorBrush x:Key="{ComponentResourceKey {x:Type local:DropDownButton}, ActiveBackground}" Color="#FFB6BDD2"/>
 
48
        <SolidColorBrush x:Key="{ComponentResourceKey {x:Type local:SplitButton}, PressedBackground}" Color="#FF8592B5"/>
 
49
        
 
50
        <!-- Style and Template for DropDownButton -->
 
51
        <Style TargetType="{x:Type local:DropDownButton}">
 
52
                <Setter Property="TextElement.Foreground" Value = "{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" />
 
53
                <Setter Property="Control.Padding" Value="2,2,2,2"/>
 
54
                <Setter Property="Border.BorderThickness" Value="1,1,1,1"/>
 
55
                <Setter Property="Panel.Background" Value="Transparent"/>
 
56
                <Setter Property="Border.BorderBrush" Value="Transparent"/>
 
57
                <Setter Property="FrameworkElement.HorizontalAlignment" Value="Center"/>
 
58
                <Setter Property="FrameworkElement.VerticalAlignment" Value="Center"/>
 
59
                <Setter Property="Control.HorizontalContentAlignment" Value="Center"/>
 
60
                <Setter Property="Control.VerticalContentAlignment" Value="Center"/>
 
61
                <Setter Property="Template">
 
62
                        <Setter.Value>
 
63
                                <ControlTemplate TargetType="local:DropDownButton"
 
64
                                                 xmlns:s="clr-namespace:System;assembly=mscorlib">
 
65
                                        <Border
 
66
                                                BorderThickness="{TemplateBinding Border.BorderThickness}"
 
67
                                                BorderBrush="{TemplateBinding Border.BorderBrush}"
 
68
                                                Background="{TemplateBinding Panel.Background}"
 
69
                                                Name="OuterBorder"
 
70
                                                SnapsToDevicePixels="True"
 
71
                                        >
 
72
                                                <StackPanel Orientation="Horizontal">
 
73
                                                        <ContentPresenter
 
74
                                                                Margin="{TemplateBinding Control.Padding}"
 
75
                                                                Content="{TemplateBinding ContentControl.Content}"
 
76
                                                                ContentTemplate="{TemplateBinding ContentControl.ContentTemplate}"
 
77
                                                                ContentStringFormat="{TemplateBinding ContentControl.ContentStringFormat}"
 
78
                                                                HorizontalAlignment="{TemplateBinding Control.HorizontalContentAlignment}"
 
79
                                                                VerticalAlignment="{TemplateBinding Control.VerticalContentAlignment}"
 
80
                                                                SnapsToDevicePixels="{TemplateBinding UIElement.SnapsToDevicePixels}" />
 
81
                                                        <Path Margin="0,2,2,2"
 
82
                                                              Data = "M0,0 L1,0 0.5,1 z"
 
83
                                                              Fill = "{TemplateBinding TextElement.Foreground}"
 
84
                                                              Width = "7"
 
85
                                                              Height = "3.5"
 
86
                                                              Stretch = "Fill"/>
 
87
                                                </StackPanel>
 
88
                                        </Border>
 
89
                                        <ControlTemplate.Triggers>
 
90
                                                <Trigger Property="UIElement.IsMouseOver" Value="True">
 
91
                                                        <Setter Property="Border.BorderBrush" TargetName="OuterBorder" Value="{DynamicResource {ComponentResourceKey {x:Type local:DropDownButton}, ActiveBorder}}" />
 
92
                                                        <Setter Property="Panel.Background" TargetName="OuterBorder" Value="{DynamicResource {ComponentResourceKey {x:Type local:DropDownButton}, ActiveBackground}}"/>
 
93
                                                </Trigger>
 
94
                                                <Trigger Property="UIElement.IsKeyboardFocused" Value="True">
 
95
                                                        <Setter Property="Border.BorderBrush" TargetName="OuterBorder" Value="{DynamicResource {ComponentResourceKey {x:Type local:DropDownButton}, ActiveBorder}}"/>
 
96
                                                        <Setter Property="Panel.Background" TargetName="OuterBorder" Value="{DynamicResource {ComponentResourceKey {x:Type local:DropDownButton}, ActiveBackground}}"/>
 
97
                                                </Trigger>
 
98
                                                <Trigger Property="UIElement.IsEnabled" Value="False">
 
99
                                                        <Setter Property="TextElement.Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
 
100
                                                </Trigger>
 
101
                                                <Trigger Property="local:DropDownButton.IsDropDownMenuOpen" Value="True">
 
102
                                                        <Setter Property="Border.BorderBrush" TargetName="OuterBorder" Value="{DynamicResource {x:Static SystemColors.ControlDarkBrushKey}}" />
 
103
                                                        <Setter Property="Border.BorderThickness" TargetName="OuterBorder" Value="1,1,1,0" />
 
104
                                                        <Setter Property="Border.Padding" TargetName="OuterBorder" Value="0,0,0,1" />
 
105
                                                        <Setter Property="Panel.Background" TargetName="OuterBorder" Value="Transparent"/>
 
106
                                                </Trigger>
 
107
                                        </ControlTemplate.Triggers>
 
108
                                </ControlTemplate>
 
109
                        </Setter.Value>
 
110
                </Setter>
 
111
        </Style>
 
112
        
 
113
        <!-- Style and Template for SplitButton -->
 
114
        <Style TargetType="{x:Type local:SplitButton}">
 
115
                <Setter Property="TextElement.Foreground" Value = "{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" />
 
116
                <Setter Property="Control.Padding" Value="2,2,2,2"/>
 
117
                <Setter Property="Border.BorderThickness" Value="1,1,1,1"/>
 
118
                <Setter Property="Panel.Background" Value="Transparent"/>
 
119
                <Setter Property="Border.BorderBrush" Value="Transparent"/>
 
120
                <Setter Property="FrameworkElement.HorizontalAlignment" Value="Center"/>
 
121
                <Setter Property="FrameworkElement.VerticalAlignment" Value="Center"/>
 
122
                <Setter Property="Control.HorizontalContentAlignment" Value="Center"/>
 
123
                <Setter Property="Control.VerticalContentAlignment" Value="Center"/>
 
124
                <Setter Property="Template">
 
125
                        <Setter.Value>
 
126
                                <ControlTemplate TargetType="local:SplitButton"
 
127
                                                 xmlns:s="clr-namespace:System;assembly=mscorlib">
 
128
                                        <Border
 
129
                                                BorderThickness="{TemplateBinding Border.BorderThickness}"
 
130
                                                BorderBrush="{TemplateBinding Border.BorderBrush}"
 
131
                                                Background="{TemplateBinding Panel.Background}"
 
132
                                                Name="OuterBorder"
 
133
                                                SnapsToDevicePixels="True"
 
134
                                        >
 
135
                                                <StackPanel Orientation="Horizontal">
 
136
                                                        <ContentPresenter
 
137
                                                                Margin="{TemplateBinding Control.Padding}"
 
138
                                                                Content="{TemplateBinding ContentControl.Content}"
 
139
                                                                ContentTemplate="{TemplateBinding ContentControl.ContentTemplate}"
 
140
                                                                ContentStringFormat="{TemplateBinding ContentControl.ContentStringFormat}"
 
141
                                                                HorizontalAlignment="{TemplateBinding Control.HorizontalContentAlignment}"
 
142
                                                                VerticalAlignment="{TemplateBinding Control.VerticalContentAlignment}"
 
143
                                                                SnapsToDevicePixels="{TemplateBinding UIElement.SnapsToDevicePixels}" />
 
144
                                                        <Border
 
145
                                                                Name="PART_DropDownArrow"
 
146
                                                                BorderThickness="1,0,0,0"
 
147
                                                                BorderBrush="{Binding ElementName=OuterBorder, Path=BorderBrush}"
 
148
                                                                SnapsToDevicePixels="True"
 
149
                                                        >
 
150
                                                                <Path Margin="2"
 
151
                                                                      Data = "M0,0 L1,0 0.5,1 z"
 
152
                                                                      Fill = "{TemplateBinding TextElement.Foreground}"
 
153
                                                                      Width = "7"
 
154
                                                                      Height = "3.5"
 
155
                                                                      Stretch = "Fill"/>
 
156
                                                        </Border>
 
157
                                                </StackPanel>
 
158
                                        </Border>
 
159
                                        <ControlTemplate.Triggers>
 
160
                                                <Trigger Property="UIElement.IsMouseOver" Value="True">
 
161
                                                        <Setter Property="Border.BorderBrush" TargetName="OuterBorder" Value="{DynamicResource {ComponentResourceKey {x:Type local:DropDownButton}, ActiveBorder}}" />
 
162
                                                        <Setter Property="Panel.Background" TargetName="OuterBorder" Value="{DynamicResource {ComponentResourceKey {x:Type local:DropDownButton}, ActiveBackground}}"/>
 
163
                                                        <Setter Property="Panel.Background" TargetName="PART_DropDownArrow" Value="{DynamicResource {ComponentResourceKey {x:Type local:DropDownButton}, ActiveBackground}}"/>
 
164
                                                </Trigger>
 
165
                                                <Trigger Property="UIElement.IsKeyboardFocused" Value="True">
 
166
                                                        <Setter Property="Border.BorderBrush" TargetName="OuterBorder" Value="{DynamicResource {ComponentResourceKey {x:Type local:DropDownButton}, ActiveBorder}}" />
 
167
                                                        <Setter Property="Panel.Background" TargetName="OuterBorder" Value="{DynamicResource {ComponentResourceKey {x:Type local:DropDownButton}, ActiveBackground}}"/>
 
168
                                                        <Setter Property="Panel.Background" TargetName="PART_DropDownArrow" Value="{DynamicResource {ComponentResourceKey {x:Type local:DropDownButton}, ActiveBackground}}"/>
 
169
                                                </Trigger>
 
170
                                                <Trigger Property="ButtonBase.IsPressed" Value="True">
 
171
                                                        <Setter Property="Border.BorderBrush" TargetName="OuterBorder" Value="{DynamicResource {ComponentResourceKey {x:Type local:DropDownButton}, ActiveBorder}}" />
 
172
                                                        <Setter Property="Panel.Background" TargetName="OuterBorder" Value="{DynamicResource {ComponentResourceKey {x:Type local:SplitButton}, PressedBackground}}"/>
 
173
                                                </Trigger>
 
174
                                                <Trigger Property="UIElement.IsEnabled" Value="False">
 
175
                                                        <Setter Property="TextElement.Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
 
176
                                                </Trigger>
 
177
                                                <Trigger Property="local:SplitButton.IsDropDownMenuOpen" Value="True">
 
178
                                                        <Setter Property="Border.BorderBrush" TargetName="OuterBorder" Value="{DynamicResource {x:Static SystemColors.ControlDarkBrushKey}}" />
 
179
                                                        <Setter Property="Border.BorderBrush" TargetName="PART_DropDownArrow" Value="Transparent" />
 
180
                                                        <Setter Property="Border.BorderThickness" TargetName="OuterBorder" Value="1,1,1,0" />
 
181
                                                        <Setter Property="Border.Padding" TargetName="OuterBorder" Value="0,0,0,1" />
 
182
                                                        <Setter Property="Panel.Background" TargetName="OuterBorder" Value="Transparent"/>
 
183
                                                        <Setter Property="Panel.Background" TargetName="PART_DropDownArrow" Value="Transparent"/>
 
184
                                                </Trigger>
 
185
                                        </ControlTemplate.Triggers>
 
186
                                </ControlTemplate>
 
187
                        </Setter.Value>
 
188
                </Setter>
 
189
        </Style>
 
190
        
 
191
        <!-- SortableGridViewColumn.
 
192
                Displays an up arrow or down arrow in the column header when the grid is sorted using that column.
 
193
        -->
 
194
        <local:ColumnSortDirectionToVisibilityConverter x:Key="ColumnSortDirectionToVisibilityConverter"/>
 
195
        
 
196
        <DataTemplate x:Key="{ComponentResourceKey {x:Type local:SortableGridViewColumn}, ColumnHeaderTemplate}">
 
197
                <StackPanel Orientation="Horizontal">
 
198
                        <TextBlock HorizontalAlignment="Center" Text="{Binding}"/>
 
199
                        <Path x:Name="upArrow"
 
200
                              Visibility="{Binding Path=Column.SortDirection, ConverterParameter={x:Static local:ColumnSortDirection.Ascending}, RelativeSource={RelativeSource AncestorType={x:Type GridViewColumnHeader}}, Converter={StaticResource ColumnSortDirectionToVisibilityConverter}}"
 
201
                              StrokeThickness = "1"
 
202
                              Fill            = "Gray"
 
203
                              Data            = "M 5,10 L 15,10 L 10,5 L 5,10"/>
 
204
                        <Path x:Name="downArrow"
 
205
                              Visibility="{Binding Path=Column.SortDirection, ConverterParameter={x:Static local:ColumnSortDirection.Descending}, RelativeSource={RelativeSource AncestorType={x:Type GridViewColumnHeader}}, Converter={StaticResource ColumnSortDirectionToVisibilityConverter}}"
 
206
                              StrokeThickness = "1"
 
207
                              Fill            = "Gray"
 
208
                              Data            = "M 5,5 L 10,10 L 15,5 L 5,5"/>
 
209
                </StackPanel>
 
210
        </DataTemplate>
 
211
</ResourceDictionary>
 
 
b'\\ No newline at end of file'