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 pathForkRepositorySelectView.xaml
More file actions
92 lines (85 loc) · 4.12 KB
/
Copy pathForkRepositorySelectView.xaml
File metadata and controls
92 lines (85 loc) · 4.12 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
<UserControl x:Class="GitHub.VisualStudio.Views.Dialog.ForkRepositorySelectView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:cache="clr-namespace:GitHub.UI.Helpers;assembly=GitHub.UI"
xmlns:ui="clr-namespace:GitHub.UI;assembly=GitHub.UI"
xmlns:ghfvs="https://github.com/github/VisualStudio"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:GitHub.VisualStudio.Views.Dialog"
xmlns:sampleData="clr-namespace:GitHub.SampleData;assembly=GitHub.App"
mc:Ignorable="d"
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}}"
d:DesignHeight="414" d:DesignWidth="440">
<Control.Resources>
<ResourceDictionary Source="DialogStyles.xaml" />
</Control.Resources>
<d:DesignProperties.DataContext>
<sampleData:ForkRepositorySelectViewModelDesigner IsLoading="True"/>
</d:DesignProperties.DataContext>
<DockPanel Margin="0 8">
<TextBlock FontSize="16" Margin="8" DockPanel.Dock="Top">
Where should we fork this repository?
</TextBlock>
<ui:GitHubProgressBar DockPanel.Dock="Top"
IsIndeterminate="True"
Style="{DynamicResource GitHubProgressBar}"
Visibility="{Binding IsLoading, Converter={ui:BooleanToHiddenVisibilityConverter}}"/>
<ListBox Name="accountsListBox"
BorderThickness="0"
ItemsSource="{Binding Accounts}"
VerticalContentAlignment="Top"
HorizontalContentAlignment="Stretch"
Padding="8"
DockPanel.Dock="Top"
ScrollViewer.HorizontalScrollBarVisibility="Disabled"
SelectionChanged="accountsListBox_SelectionChanged">
<ListBox.ItemsPanel>
<ItemsPanelTemplate>
<UniformGrid Columns="3" IsItemsHost="True" />
</ItemsPanelTemplate>
</ListBox.ItemsPanel>
<ListBox.ItemTemplate>
<DataTemplate>
<Border Margin="4" CornerRadius="3">
<DockPanel>
<TextBlock DockPanel.Dock="Bottom"
Margin="4,0,4,4"
Text="{Binding Login, StringFormat=@{0}}"
TextAlignment="Center"
TextTrimming="CharacterEllipsis"/>
<Image Margin="4"
Width="100"
Height="100"
Stretch="Uniform"
Source="{Binding AvatarUrl}" />
</DockPanel>
</Border>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
<DockPanel Margin="0 16 0 0"
DockPanel.Dock="Bottom"
Visibility="{Binding ExistingForks, Converter={ui:HasItemsVisibilityConverter}}">
<TextBlock DockPanel.Dock="Top" Margin="8 0">
<Run FontWeight="SemiBold">Can't find what you're looking for?</Run>
<LineBreak/>
<Run>You have existing forks of this repository:</Run>
</TextBlock>
<ItemsControl ItemsSource="{Binding ExistingForks}" DockPanel.Dock="Bottom" MaxHeight="120" Padding="8 0" ScrollViewer.VerticalScrollBarVisibility="Auto">
<ItemsControl.ItemTemplate>
<DataTemplate>
<StackPanel Orientation="Horizontal" Margin="0 4 0 0">
<ui:OcticonImage Icon="repo_forked" Margin="0,0,2,-2"/>
<TextBlock Text="{Binding Owner, Mode=OneWay}"/>
<TextBlock Text="/"/>
<TextBlock Text="{Binding Name, Mode=OneWay}"/>
</StackPanel>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
</DockPanel>
</DockPanel>
</UserControl>