~halega/+junk/sharpdevelop

« back to all changes in this revision

Viewing changes to src/AddIns/Debugger/Debugger.AddIn/Visualizers/GridVisualizer/ColumnPicker.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: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"
 
6
>
 
7
        <Style x:Key="ComboBoxFocusVisual">
 
8
            <Setter Property="Control.Template">
 
9
                <Setter.Value>
 
10
                    <ControlTemplate>
 
11
                        <Rectangle Stroke="Black" StrokeDashArray="1 2" StrokeThickness="1" Margin="4,4,21,4" SnapsToDevicePixels="true"/>
 
12
                    </ControlTemplate>
 
13
                </Setter.Value>
 
14
            </Setter>
 
15
        </Style>
 
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">
 
30
                <Setter.Value>
 
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}"/>
 
35
                            </Grid>
 
36
                        </Microsoft_Windows_Themes:ButtonChrome>
 
37
                        <ControlTemplate.Triggers>
 
38
                            <Trigger Property="IsChecked" Value="true">
 
39
                                <Setter Property="RenderPressed" TargetName="Chrome" Value="true"/>
 
40
                            </Trigger>
 
41
                            <Trigger Property="IsEnabled" Value="false">
 
42
                                <Setter Property="Fill" TargetName="Arrow" Value="#AFAFAF"/>
 
43
                            </Trigger>
 
44
                        </ControlTemplate.Triggers>
 
45
                    </ControlTemplate>
 
46
                </Setter.Value>
 
47
            </Setter>
 
48
        </Style>
 
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">
 
61
                <Setter.Value>
 
62
                    <ControlTemplate TargetType="{x:Type TextBox}">
 
63
                        <ScrollViewer x:Name="PART_ContentHost" Background="Transparent" Focusable="false" HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Hidden"/>
 
64
                    </ControlTemplate>
 
65
                </Setter.Value>
 
66
            </Setter>
 
67
        </Style>
 
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">
 
74
                <Setter.Value>
 
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"/>
 
82
                            </Trigger>
 
83
                            <Trigger Property="IsEnabled" Value="false">
 
84
                                <Setter Property="Fill" TargetName="Arrow" Value="#AFAFAF"/>
 
85
                            </Trigger>
 
86
                        </ControlTemplate.Triggers>
 
87
                    </ControlTemplate>
 
88
                </Setter.Value>
 
89
            </Setter>
 
90
        </Style>
 
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">
 
100
                            <ScrollViewer>
 
101
                                <ItemsPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" KeyboardNavigation.DirectionalNavigation="Contained"/>
 
102
                            </ScrollViewer>
 
103
                        </Border>
 
104
                    </Microsoft_Windows_Themes:SystemDropShadowChrome>
 
105
                </Popup>
 
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}}"/>
 
109
            </Grid>
 
110
            <ControlTemplate.Triggers>
 
111
                <Trigger Property="IsKeyboardFocusWithin" Value="true">
 
112
                    <Setter Property="Foreground" Value="Black"/>
 
113
                </Trigger>
 
114
                <Trigger Property="IsDropDownOpen" Value="true">
 
115
                    <Setter Property="RenderFocused" TargetName="Border" Value="true"/>
 
116
                </Trigger>
 
117
                <Trigger Property="HasItems" Value="false">
 
118
                    <Setter Property="Height" TargetName="DropDownBorder" Value="95"/>
 
119
                </Trigger>
 
120
                <Trigger Property="IsEnabled" Value="false">
 
121
                    <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
 
122
                    <Setter Property="Background" Value="#FFF4F4F4"/>
 
123
                </Trigger>
 
124
                <Trigger Property="IsGrouping" Value="true">
 
125
                    <Setter Property="ScrollViewer.CanContentScroll" Value="false"/>
 
126
                </Trigger>
 
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"/>
 
130
                </Trigger>
 
131
            </ControlTemplate.Triggers>
 
132
        </ControlTemplate>
 
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">
 
143
                <Setter.Value>
 
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"/>
 
155
                                        </ScrollViewer>
 
156
                                    </Border>
 
157
                                </Microsoft_Windows_Themes:SystemDropShadowChrome>
 
158
                            </Popup>
 
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 -->
 
161
                            <ContentPresenter 
 
162
                                HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" 
 
163
                                Margin="{TemplateBinding Padding}" 
 
164
                                VerticalAlignment="{TemplateBinding VerticalContentAlignment}" 
 
165
                                IsHitTestVisible="false" 
 
166
                                SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" 
 
167
                                ContentStringFormat="{TemplateBinding SelectionBoxItemStringFormat}" 
 
168
                                Content="Columns" />
 
169
                        </Grid>
 
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"/>
 
174
                            </Trigger>
 
175
                            <Trigger Property="HasItems" Value="false">
 
176
                                <Setter Property="Height" TargetName="DropDownBorder" Value="95"/>
 
177
                            </Trigger>
 
178
                            <Trigger Property="IsEnabled" Value="false">
 
179
                                <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
 
180
                                <Setter Property="Background" Value="#FFF4F4F4"/>
 
181
                            </Trigger>
 
182
                            <Trigger Property="IsGrouping" Value="true">
 
183
                                <Setter Property="ScrollViewer.CanContentScroll" Value="false"/>
 
184
                            </Trigger>
 
185
                        </ControlTemplate.Triggers>
 
186
                    </ControlTemplate>
 
187
                </Setter.Value>
 
188
            </Setter>
 
189
            <Style.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}"/>
 
196
                </Trigger>
 
197
            </Style.Triggers>
 
198
        </Style>
 
199
</ResourceDictionary>
 
 
b'\\ No newline at end of file'