1
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
2
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
3
xmlns:dv="clr-namespace:Debugger.AddIn.Visualizers.Graph"
4
xmlns:core="http://icsharpcode.net/sharpdevelop/core"
5
xmlns:Microsoft_Windows_Themes="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Aero"
7
<Style x:Key="ComboBoxFocusVisual">
8
<Setter Property="Control.Template">
11
<Rectangle Stroke="Black" StrokeDashArray="1 2" StrokeThickness="1" Margin="4,4,21,4" SnapsToDevicePixels="true"/>
16
<LinearGradientBrush x:Key="ButtonNormalBackground" EndPoint="0,1" StartPoint="0,0">
17
<GradientStop Color="#F3F3F3" Offset="0"/>
18
<GradientStop Color="#EBEBEB" Offset="0.5"/>
19
<GradientStop Color="#DDDDDD" Offset="0.5"/>
20
<GradientStop Color="#CDCDCD" Offset="1"/>
21
</LinearGradientBrush>
22
<SolidColorBrush x:Key="ButtonNormalBorder" Color="#FF707070"/>
23
<Geometry x:Key="DownArrowGeometry">M 0 0 L 3.5 4 L 7 0 Z</Geometry>
24
<Style x:Key="ComboBoxReadonlyToggleButton" TargetType="{x:Type ToggleButton}">
25
<Setter Property="OverridesDefaultStyle" Value="true"/>
26
<Setter Property="IsTabStop" Value="false"/>
27
<Setter Property="Focusable" Value="false"/>
28
<Setter Property="ClickMode" Value="Press"/>
29
<Setter Property="Template">
31
<ControlTemplate TargetType="{x:Type ToggleButton}">
32
<Microsoft_Windows_Themes:ButtonChrome x:Name="Chrome" SnapsToDevicePixels="true" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" RenderMouseOver="{TemplateBinding IsMouseOver}" RenderPressed="{TemplateBinding IsPressed}">
33
<Grid HorizontalAlignment="Right" Width="{DynamicResource {x:Static SystemParameters.VerticalScrollBarWidthKey}}">
34
<Path x:Name="Arrow" Fill="Black" HorizontalAlignment="Center" Margin="3,1,0,0" VerticalAlignment="Center" Data="{StaticResource DownArrowGeometry}"/>
36
</Microsoft_Windows_Themes:ButtonChrome>
37
<ControlTemplate.Triggers>
38
<Trigger Property="IsChecked" Value="true">
39
<Setter Property="RenderPressed" TargetName="Chrome" Value="true"/>
41
<Trigger Property="IsEnabled" Value="false">
42
<Setter Property="Fill" TargetName="Arrow" Value="#AFAFAF"/>
44
</ControlTemplate.Triggers>
49
<LinearGradientBrush x:Key="TextBoxBorder" EndPoint="0,20" StartPoint="0,0" MappingMode="Absolute">
50
<GradientStop Color="#ABADB3" Offset="0.05"/>
51
<GradientStop Color="#E2E3EA" Offset="0.07"/>
52
<GradientStop Color="#E3E9EF" Offset="1"/>
53
</LinearGradientBrush>
54
<Style x:Key="ComboBoxEditableTextBox" TargetType="{x:Type TextBox}">
55
<Setter Property="OverridesDefaultStyle" Value="true"/>
56
<Setter Property="AllowDrop" Value="true"/>
57
<Setter Property="MinWidth" Value="0"/>
58
<Setter Property="MinHeight" Value="0"/>
59
<Setter Property="FocusVisualStyle" Value="{x:Null}"/>
60
<Setter Property="Template">
62
<ControlTemplate TargetType="{x:Type TextBox}">
63
<ScrollViewer x:Name="PART_ContentHost" Background="Transparent" Focusable="false" HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Hidden"/>
68
<Style x:Key="ComboBoxToggleButton" TargetType="{x:Type ToggleButton}">
69
<Setter Property="OverridesDefaultStyle" Value="true"/>
70
<Setter Property="IsTabStop" Value="false"/>
71
<Setter Property="Focusable" Value="false"/>
72
<Setter Property="ClickMode" Value="Press"/>
73
<Setter Property="Template">
75
<ControlTemplate TargetType="{x:Type ToggleButton}">
76
<Microsoft_Windows_Themes:ButtonChrome x:Name="Chrome" Width="{DynamicResource {x:Static SystemParameters.VerticalScrollBarWidthKey}}" SnapsToDevicePixels="true" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" RenderMouseOver="{TemplateBinding IsMouseOver}" RenderPressed="{TemplateBinding IsPressed}" RoundCorners="false">
77
<Path x:Name="Arrow" Fill="Black" HorizontalAlignment="Center" Margin="0,1,0,0" VerticalAlignment="Center" Data="{StaticResource DownArrowGeometry}"/>
78
</Microsoft_Windows_Themes:ButtonChrome>
79
<ControlTemplate.Triggers>
80
<Trigger Property="IsChecked" Value="true">
81
<Setter Property="RenderPressed" TargetName="Chrome" Value="true"/>
83
<Trigger Property="IsEnabled" Value="false">
84
<Setter Property="Fill" TargetName="Arrow" Value="#AFAFAF"/>
86
</ControlTemplate.Triggers>
91
<ControlTemplate x:Key="ComboBoxEditableTemplate" TargetType="{x:Type ComboBox}">
92
<Grid x:Name="Placement" SnapsToDevicePixels="true">
93
<Grid.ColumnDefinitions>
94
<ColumnDefinition Width="*"/>
95
<ColumnDefinition Width="Auto"/>
96
</Grid.ColumnDefinitions>
97
<Popup x:Name="PART_Popup" AllowsTransparency="true" IsOpen="{Binding IsDropDownOpen, RelativeSource={RelativeSource TemplatedParent}}" Placement="Bottom" PopupAnimation="{DynamicResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}" Grid.ColumnSpan="2">
98
<Microsoft_Windows_Themes:SystemDropShadowChrome x:Name="Shdw" MaxHeight="{TemplateBinding MaxDropDownHeight}" MinWidth="{Binding ActualWidth, ElementName=Placement}" Color="Transparent">
99
<Border x:Name="DropDownBorder" Background="{DynamicResource {x:Static SystemColors.WindowBrushKey}}" BorderBrush="{DynamicResource {x:Static SystemColors.WindowFrameBrushKey}}" BorderThickness="1">
101
<ItemsPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" KeyboardNavigation.DirectionalNavigation="Contained"/>
104
</Microsoft_Windows_Themes:SystemDropShadowChrome>
106
<Microsoft_Windows_Themes:ListBoxChrome x:Name="Border" Grid.ColumnSpan="2" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" RenderFocused="{TemplateBinding IsKeyboardFocusWithin}" RenderMouseOver="{TemplateBinding IsMouseOver}"/>
107
<TextBox x:Name="PART_EditableTextBox" Margin="{TemplateBinding Padding}" Style="{StaticResource ComboBoxEditableTextBox}" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" IsReadOnly="{Binding IsReadOnly, RelativeSource={RelativeSource TemplatedParent}}"/>
108
<ToggleButton Style="{StaticResource ComboBoxToggleButton}" Grid.Column="1" IsChecked="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"/>
110
<ControlTemplate.Triggers>
111
<Trigger Property="IsKeyboardFocusWithin" Value="true">
112
<Setter Property="Foreground" Value="Black"/>
114
<Trigger Property="IsDropDownOpen" Value="true">
115
<Setter Property="RenderFocused" TargetName="Border" Value="true"/>
117
<Trigger Property="HasItems" Value="false">
118
<Setter Property="Height" TargetName="DropDownBorder" Value="95"/>
120
<Trigger Property="IsEnabled" Value="false">
121
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
122
<Setter Property="Background" Value="#FFF4F4F4"/>
124
<Trigger Property="IsGrouping" Value="true">
125
<Setter Property="ScrollViewer.CanContentScroll" Value="false"/>
127
<Trigger Property="HasDropShadow" SourceName="PART_Popup" Value="true">
128
<Setter Property="Margin" TargetName="Shdw" Value="0,0,5,5"/>
129
<Setter Property="Color" TargetName="Shdw" Value="#71000000"/>
131
</ControlTemplate.Triggers>
133
<Style x:Key="styleColumnsComboBox" TargetType="{x:Type ComboBox}">
134
<Setter Property="FocusVisualStyle" Value="{StaticResource ComboBoxFocusVisual}"/>
135
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.WindowTextBrushKey}}"/>
136
<Setter Property="Background" Value="{StaticResource ButtonNormalBackground}"/>
137
<Setter Property="BorderBrush" Value="{StaticResource ButtonNormalBorder}"/>
138
<Setter Property="BorderThickness" Value="1"/>
139
<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto"/>
140
<Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/>
141
<Setter Property="Padding" Value="4,3"/>
142
<Setter Property="Template">
144
<ControlTemplate TargetType="{x:Type ComboBox}">
145
<Grid x:Name="MainGrid" SnapsToDevicePixels="true">
146
<Grid.ColumnDefinitions>
147
<ColumnDefinition Width="*"/>
148
<ColumnDefinition MinWidth="{DynamicResource {x:Static SystemParameters.VerticalScrollBarWidthKey}}" Width="0"/>
149
</Grid.ColumnDefinitions>
150
<Popup x:Name="PART_Popup" Margin="1" AllowsTransparency="true" IsOpen="{Binding IsDropDownOpen, RelativeSource={RelativeSource TemplatedParent}}" Placement="Bottom" PopupAnimation="{DynamicResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}" Grid.ColumnSpan="2">
151
<Microsoft_Windows_Themes:SystemDropShadowChrome x:Name="Shdw" MaxHeight="{TemplateBinding MaxDropDownHeight}" MinWidth="{Binding ActualWidth, ElementName=MainGrid}" Color="Transparent">
152
<Border x:Name="DropDownBorder" Background="{DynamicResource {x:Static SystemColors.WindowBrushKey}}" BorderBrush="{DynamicResource {x:Static SystemColors.WindowFrameBrushKey}}" BorderThickness="1">
153
<ScrollViewer CanContentScroll="true">
154
<ItemsPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" KeyboardNavigation.DirectionalNavigation="Contained"/>
157
</Microsoft_Windows_Themes:SystemDropShadowChrome>
159
<ToggleButton Style="{StaticResource ComboBoxReadonlyToggleButton}" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" Grid.ColumnSpan="2" IsChecked="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"/>
160
<!-- here the content of ComboBox is defined -->
162
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
163
Margin="{TemplateBinding Padding}"
164
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
165
IsHitTestVisible="false"
166
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
167
ContentStringFormat="{TemplateBinding SelectionBoxItemStringFormat}"
170
<ControlTemplate.Triggers>
171
<Trigger Property="HasDropShadow" SourceName="PART_Popup" Value="true">
172
<Setter Property="Margin" TargetName="Shdw" Value="0,0,5,5"/>
173
<Setter Property="Color" TargetName="Shdw" Value="#71000000"/>
175
<Trigger Property="HasItems" Value="false">
176
<Setter Property="Height" TargetName="DropDownBorder" Value="95"/>
178
<Trigger Property="IsEnabled" Value="false">
179
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
180
<Setter Property="Background" Value="#FFF4F4F4"/>
182
<Trigger Property="IsGrouping" Value="true">
183
<Setter Property="ScrollViewer.CanContentScroll" Value="false"/>
185
</ControlTemplate.Triggers>
190
<Trigger Property="IsEditable" Value="true">
191
<Setter Property="BorderBrush" Value="{StaticResource TextBoxBorder}"/>
192
<Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.WindowBrushKey}}"/>
193
<Setter Property="IsTabStop" Value="false"/>
194
<Setter Property="Padding" Value="3"/>
195
<Setter Property="Template" Value="{StaticResource ComboBoxEditableTemplate}"/>
199
</ResourceDictionary>
b'\\ No newline at end of file'