This repository was archived by the owner on Jun 21, 2023. It is now read-only.
Repository navigation
Expand file tree
/
Copy pathGitHubDialogWindow.xaml
More file actions
93 lines (90 loc) · 5.45 KB
/
Copy pathGitHubDialogWindow.xaml
File metadata and controls
93 lines (90 loc) · 5.45 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
<ui:DialogWindow x:Class="GitHub.VisualStudio.Views.Dialog.GitHubDialogWindow"
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:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:ui="clr-namespace:Microsoft.VisualStudio.PlatformUI;assembly=Microsoft.VisualStudio.Shell.14.0"
xmlns:shellControls="clr-namespace:Microsoft.VisualStudio.PlatformUI.Shell.Controls;assembly=Microsoft.VisualStudio.Shell.ViewManager"
xmlns:local="clr-namespace:GitHub.VisualStudio.Views"
xmlns:ghfvs="https://github.com/github/VisualStudio"
mc:Ignorable="d"
Title="{Binding Content.Title, FallbackValue=GitHub}"
Width="414"
Height="460"
MinWidth="414"
MinHeight="460"
xmlns:vs="clr-namespace:Microsoft.VisualStudio.PlatformUI;assembly=Microsoft.VisualStudio.Shell.14.0"
Background="{DynamicResource {x:Static vs:ThemedDialogColors.WindowPanelBrushKey}}"
Foreground="{DynamicResource {x:Static vs:ThemedDialogColors.WindowPanelTextBrushKey}}"
FontFamily="Segoe UI"
FontSize="12"
FontStretch="Normal"
FontStyle="Normal"
FontWeight="Normal"
SnapsToDevicePixels="True"
UseLayoutRounding="True"
WindowStartupLocation="CenterOwner"
WindowStyle="None"
WindowState="Normal"
ResizeMode="CanResize"
ShowInTaskbar="false"
Content="{Binding Content}">
<WindowChrome.WindowChrome>
<WindowChrome
CaptionHeight="0"
ResizeBorderThickness="5" />
</WindowChrome.WindowChrome>
<Window.Resources>
<ResourceDictionary>
<local:ViewLocator x:Key="viewLocator"/>
<DataTemplate DataType="{x:Type ghfvs:ViewModelBase}">
<ContentControl Content="{Binding Converter={StaticResource viewLocator}}"/>
</DataTemplate>
</ResourceDictionary>
</Window.Resources>
<Window.ContentTemplate>
<DataTemplate>
<Border MouseDown="Border_MouseDown"
BorderThickness="1"
Background="{DynamicResource {x:Static vs:ThemedDialogColors.WindowPanelBrushKey}}"
BorderBrush="{DynamicResource {x:Static vs:ThemedDialogColors.WindowBorderBrushKey}}">
<DockPanel>
<DockPanel DockPanel.Dock="Top">
<Label Content="{Binding Title}"
Foreground="{DynamicResource {x:Static ui:ThemedDialogColors.WindowPanelTextBrushKey}}"
DockPanel.Dock="Left"
Margin="9,5,0,0"
/>
<!-- close button and padding -->
<shellControls:GlyphButton x:Uid="button_Close"
x:Name="CloseButton"
Width="46"
Height="33"
DockPanel.Dock="Right"
HorizontalAlignment="Right"
VerticalAlignment="Top"
BorderBrush="Transparent"
BorderThickness="0"
Background="{DynamicResource {x:Static ui:ThemedDialogColors.WindowButtonBrushKey}}"
GlyphForeground="{DynamicResource {x:Static ui:ThemedDialogColors.WindowButtonGlyphBrushKey}}"
HoverBackground="{DynamicResource {x:Static ui:ThemedDialogColors.WindowButtonHoverBrushKey}}"
HoverForeground="{DynamicResource {x:Static ui:ThemedDialogColors.WindowButtonHoverGlyphBrushKey}}"
HoverBorderBrush="{DynamicResource {x:Static ui:ThemedDialogColors.WindowButtonHoverBorderBrushKey}}"
PressedBackground="{DynamicResource {x:Static ui:ThemedDialogColors.WindowButtonDownBrushKey}}"
PressedForeground="{DynamicResource {x:Static ui:ThemedDialogColors.WindowButtonDownGlyphBrushKey}}"
PressedBorderBrush="{DynamicResource {x:Static ui:ThemedDialogColors.WindowButtonDownBorderBrushKey}}"
Click="CloseButton_Click">
<Path x:Uid="path_CloseButton"
Width="16"
Height="16"
Fill="{Binding Path=(TextElement.Foreground), RelativeSource={RelativeSource Self}}"
Data="F1M8.583,8L13,12.424 12.424,13 8,8.583 3.576,13 3,12.424 7.417,8 3,3.576 3.576,3 8,7.417 12.424,3 13,3.576z"/>
</shellControls:GlyphButton>
</DockPanel>
<!-- content -->
<ContentControl Content="{Binding Converter={StaticResource viewLocator}}"/>
</DockPanel>
</Border>
</DataTemplate>
</Window.ContentTemplate>
</ui:DialogWindow>