This repository was archived by the owner on Jun 21, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Expand file tree
/
Copy pathOptionsControl.xaml
More file actions
107 lines (107 loc) · 4.9 KB
/
OptionsControl.xaml
File metadata and controls
107 lines (107 loc) · 4.9 KB
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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
<UserControl x:Class="GitHub.VisualStudio.UI.OptionsControl"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:GitHub.VisualStudio.UI"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:prop="clr-namespace:GitHub.VisualStudio.UI;assembly=GitHub.VisualStudio.UI"
d:DesignHeight="200"
mc:Ignorable="d">
<UserControl.Resources>
<BorderGapMaskConverter x:Key="BorderGapMaskConverter" />
<Style x:Key="GroupBoxFlat" TargetType="{x:Type GroupBox}">
<Setter Property="BorderBrush" Value="#D5DFE5" />
<Setter Property="BorderThickness" Value="1" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type GroupBox}">
<Grid SnapsToDevicePixels="true">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="6" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="6" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
<RowDefinition Height="6" />
</Grid.RowDefinitions>
<Border x:Name="Header"
Grid.Row="0"
Grid.RowSpan="2"
Grid.Column="1"
Padding="3,1,3,0">
<ContentPresenter ContentSource="Header" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
</Border>
<Border Grid.Row="1"
Grid.RowSpan="3"
Grid.ColumnSpan="4"
BorderBrush="Transparent"
BorderThickness="{TemplateBinding BorderThickness}"
CornerRadius="4">
<Border.OpacityMask>
<MultiBinding Converter="{StaticResource BorderGapMaskConverter}" ConverterParameter="7">
<Binding ElementName="Header" Path="ActualWidth" />
<Binding Path="ActualWidth" RelativeSource="{RelativeSource Self}" />
<Binding Path="ActualHeight" RelativeSource="{RelativeSource Self}" />
</MultiBinding>
</Border.OpacityMask>
<Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="3" />
</Border>
<ContentPresenter Grid.Row="2"
Grid.Column="1"
Grid.ColumnSpan="2"
Margin="{TemplateBinding Padding}"
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</UserControl.Resources>
<StackPanel>
<GroupBox
Margin="8,0,8,0"
VerticalAlignment="Top"
BorderBrush="LightGray"
BorderThickness="1"
Padding="6 8 6 8"
Style="{DynamicResource GroupBoxFlat}">
<GroupBox.Header>
<Run Text="{x:Static prop:Resources.Options_PrivacyTitle}" />
</GroupBox.Header>
<DockPanel>
<WrapPanel DockPanel.Dock="Top">
<CheckBox x:Name="chkMetrics" VerticalAlignment="Center" Content="{x:Static prop:Resources.Options_MetricsLabel}" />
</WrapPanel>
<TextBlock>
<Hyperlink ToolTip="https://visualstudio.github.com/samples.html" NavigateUri="https://visualstudio.github.com/samples.html" RequestNavigate="Hyperlink_RequestNavigate"><TextBlock Text="{x:Static prop:Resources.learnMoreLink}"/></Hyperlink>
</TextBlock>
</DockPanel>
</GroupBox>
<GroupBox
Margin="8,0,8,0"
VerticalAlignment="Top"
BorderBrush="LightGray"
BorderThickness="1"
Padding="6 8 6 8"
Style="{DynamicResource GroupBoxFlat}">
<GroupBox.Header>
<Run Text="{x:Static prop:Resources.Options_ExperimentalTitle}" />
</GroupBox.Header>
<DockPanel>
<WrapPanel DockPanel.Dock="Top">
<CheckBox x:Name="chkEditorComments" VerticalAlignment="Center" Content="{x:Static prop:Resources.Options_EditorCommentsLabel}" />
</WrapPanel>
<TextBlock DockPanel.Dock="Bottom" TextWrapping="Wrap">
<LineBreak />
<Italic>
<Run Text="{x:Static prop:Resources.Options_ExperimentalNote}" />
</Italic>
</TextBlock>
</DockPanel>
</GroupBox>
</StackPanel>
</UserControl>