-
Notifications
You must be signed in to change notification settings - Fork 15
/
VsoPageControl.xaml
141 lines (135 loc) · 8.02 KB
/
VsoPageControl.xaml
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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
<UserControl x:Class="SolutionStartPage.Vs2015.Views.BasicPart.VsoPageControl"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:platformUi="clr-namespace:Microsoft.VisualStudio.PlatformUI;assembly=Microsoft.VisualStudio.Shell.14.0"
xmlns:vsfxim="clr-namespace:Microsoft.VisualStudio.Shell;assembly=Microsoft.VisualStudio.Shell.Immutable.11.0"
xmlns:vsfx="clr-namespace:Microsoft.VisualStudio.Shell;assembly=Microsoft.VisualStudio.Shell.14.0"
Background="Transparent">
<UserControl.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary
Source="pack://application:,,,/Microsoft.VisualStudio.Shell.14.0;component/ui/styles/startpageresources.xaml" />
<ResourceDictionary>
<Style x:Key="StartPage.ProjectCommand.LinkStyle" TargetType="{x:Type platformUi:ImageButton}"
BasedOn="{StaticResource StartPage.ProjectCommand.ButtonStyle}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type platformUi:ImageButton}">
<TextBlock x:Name="PART_Text"
x:Uid="PART_Text"
Text="{TemplateBinding ContentControl.Content}"
VerticalAlignment="Center"
Style="{StaticResource StartPage.NormalTextStyle}"
Foreground="{DynamicResource {x:Static vsfx:VsBrushes.StartPageTextControlLinkSelectedKey}}"
FocusVisualStyle="{DynamicResource StartPage.CommandButtonFocusVisual}" />
<ControlTemplate.Triggers>
<Trigger Property="UIElement.IsMouseOver" Value="true">
<Setter Property="FrameworkElement.Cursor" Value="Hand" />
<Setter TargetName="PART_Text"
Value="{DynamicResource {x:Static vsfx:VsBrushes.StartPageTextControlLinkSelectedHoverKey}}"
Property="TextBlock.Foreground" />
</Trigger>
<Trigger Property="UIElement.IsFocused" Value="true">
<Setter TargetName="PART_Text"
Value="{DynamicResource {x:Static vsfx:VsBrushes.StartPageTextControlLinkSelectedHoverKey}}"
Property="TextBlock.Foreground" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ResourceDictionary>
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</UserControl.Resources>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" /> <!-- Header -->
<RowDefinition Height="Auto" /> <!-- Start -->
<RowDefinition Height="*" /> <!-- Recent Project / Solution List -->
<RowDefinition Height="Auto" /> <!-- Options -->
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="22" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<!-- Header -->
<TextBlock Grid.Row="0"
Grid.Column="1"
x:Name="VisualStudioEditionTextBlock"
Style="{DynamicResource StartPage.AnnouncementsHeadingTextStyle}"
Margin="0,25,0,0"
FontSize="28"
FontStretch="SemiCondensed"
Text="{Binding StartPageHeaderTitle}" />
<!-- Start -->
<Grid Grid.Row="1"
Grid.Column="1"
Margin="6,37,30,0">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<TextBlock Grid.Row="0"
Margin="0,10"
Style="{DynamicResource StartPage.ItemHeadingTextStyle}"
Text="{Binding [Start], Source={StaticResource SSP_Texts}}" />
<platformUi:ImageButton Grid.Row="1"
Margin="0,3"
Content="{Binding [NewProject], Source={StaticResource SSP_Texts}}"
Style="{StaticResource StartPage.ProjectCommand.LinkStyle}"
Command="{x:Static vsfxim:VSCommands.ExecuteCommand}"
CommandParameter="File.NewProject" />
<platformUi:ImageButton Grid.Row="2"
Margin="0,3"
Content="{Binding [OpenProject], Source={StaticResource SSP_Texts}}"
Style="{StaticResource StartPage.ProjectCommand.LinkStyle}"
Command="{x:Static vsfxim:VSCommands.ExecuteCommand}"
CommandParameter="File.OpenProject" />
<platformUi:ImageButton Grid.Row="3"
Margin="0,3"
Content="{Binding [OpenFromSourceControl], Source={StaticResource SSP_Texts}}"
Style="{StaticResource StartPage.ProjectCommand.LinkStyle}"
Command="{x:Static vsfxim:VSCommands.ExecuteCommand}"
CommandParameter="File.OpenfromSourceControl" />
</Grid>
<!-- Recent Project / Solution List -->
<Grid Grid.Row="2"
Grid.Column="1"
Margin="7,34,30,0">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<TextBlock Grid.Row="0"
Margin="0,10"
Style="{DynamicResource StartPage.ItemHeadingTextStyle}"
Text="{Binding [Recent], Source={StaticResource SSP_Texts}}" />
<platformUi:MruListBox Grid.Row="1"
Margin="-28,0,0,0"
DataContext="{Binding RecentProjects}"
ItemsSource="{Binding Path=Items}"
Background="Transparent"
BorderThickness="0"
AutomationProperties.AutomationId="MruList" />
</Grid>
<!-- Options -->
<StackPanel Grid.Row="3"
Grid.Column="1"
Margin="4,0,30,49">
<CheckBox Style="{StaticResource StartPage.CheckBoxStyle}"
Margin="0,5,0,0"
Content="{Binding [KeepPageOpenAfterLoad], Source={StaticResource SSP_Texts}}"
IsChecked="{Binding KeepPageOpenAfterOpenProject, Mode=TwoWay}" />
<CheckBox Style="{StaticResource StartPage.CheckBoxStyle}"
Margin="0,5,0,0"
Content="{Binding [ShowPageOnStartup], Source={StaticResource SSP_Texts}}"
IsChecked="{Binding ShowPageAtStartup, Mode=TwoWay}" />
</StackPanel>
</Grid>
</UserControl>