|
27 | 27 | <Grid.RowDefinitions> |
28 | 28 | <RowDefinition Height="Auto"/> |
29 | 29 | <RowDefinition Height="Auto"/> |
| 30 | + <RowDefinition Height="*"/> |
| 31 | + <RowDefinition Height="Auto"/> |
30 | 32 | </Grid.RowDefinitions> |
31 | 33 |
|
32 | | - <DockPanel Grid.Row="0"> |
33 | | - <TextBlock DockPanel.Dock="Top" FontSize="16" Margin="8"> |
| 34 | + <TextBlock Grid.Row="0" FontSize="16" Margin="8"> |
34 | 35 | Where should we fork this repository? |
35 | | - </TextBlock> |
| 36 | + </TextBlock> |
36 | 37 |
|
37 | | - <ui:GitHubProgressBar DockPanel.Dock="Top" |
| 38 | + <ui:GitHubProgressBar Grid.Row="1" |
38 | 39 | Foreground="{DynamicResource GitHubAccentBrush}" |
39 | 40 | IsIndeterminate="True" |
40 | 41 | Style="{DynamicResource GitHubProgressBar}" |
41 | 42 | Visibility="{Binding IsLoading, Converter={ui:BooleanToHiddenVisibilityConverter}}"/> |
42 | 43 |
|
43 | | - <ListBox Name="accountsListBox" |
44 | | - BorderThickness="0" |
45 | | - ItemsSource="{Binding Accounts}" |
46 | | - VerticalContentAlignment="Top" |
47 | | - HorizontalContentAlignment="Stretch" |
48 | | - Padding="8" |
49 | | - DockPanel.Dock="Top" |
50 | | - ScrollViewer.HorizontalScrollBarVisibility="Disabled" |
51 | | - SelectionChanged="accountsListBox_SelectionChanged"> |
52 | | - <ListBox.ItemsPanel> |
53 | | - <ItemsPanelTemplate> |
54 | | - <UniformGrid Columns="3" IsItemsHost="True" /> |
55 | | - </ItemsPanelTemplate> |
56 | | - </ListBox.ItemsPanel> |
57 | | - <ListBox.ItemTemplate> |
58 | | - <DataTemplate> |
59 | | - <Border Margin="4" Background="#fff2f2f2" CornerRadius="3"> |
60 | | - <DockPanel> |
61 | | - <TextBlock DockPanel.Dock="Bottom" |
| 44 | + <ListBox Name="accountsListBox" |
| 45 | + Grid.Row="2" |
| 46 | + BorderThickness="0" |
| 47 | + ItemsSource="{Binding Accounts}" |
| 48 | + VerticalContentAlignment="Top" |
| 49 | + HorizontalContentAlignment="Stretch" |
| 50 | + Padding="8" |
| 51 | + DockPanel.Dock="Top" |
| 52 | + ScrollViewer.HorizontalScrollBarVisibility="Disabled" |
| 53 | + SelectionChanged="accountsListBox_SelectionChanged"> |
| 54 | + <ListBox.ItemsPanel> |
| 55 | + <ItemsPanelTemplate> |
| 56 | + <UniformGrid Columns="3" IsItemsHost="True" /> |
| 57 | + </ItemsPanelTemplate> |
| 58 | + </ListBox.ItemsPanel> |
| 59 | + <ListBox.ItemTemplate> |
| 60 | + <DataTemplate> |
| 61 | + <Border Margin="4" Background="#fff2f2f2" CornerRadius="3"> |
| 62 | + <DockPanel> |
| 63 | + <TextBlock DockPanel.Dock="Bottom" |
62 | 64 | Margin="4,0,4,4" |
63 | 65 | Text="{Binding Login, StringFormat=@{0}}" |
64 | 66 | TextAlignment="Center" |
65 | 67 | TextTrimming="CharacterEllipsis"/> |
66 | | - <Image |
| 68 | + <Image |
67 | 69 | Margin="4" |
68 | 70 | MaxWidth="100" |
69 | 71 | Source="{Binding Avatar}" /> |
70 | | - </DockPanel> |
71 | | - </Border> |
72 | | - </DataTemplate> |
73 | | - </ListBox.ItemTemplate> |
74 | | - </ListBox> |
| 72 | + </DockPanel> |
| 73 | + </Border> |
| 74 | + </DataTemplate> |
| 75 | + </ListBox.ItemTemplate> |
| 76 | + </ListBox> |
75 | 77 |
|
76 | | - <DockPanel DockPanel.Dock="Bottom" Margin="0 16 0 0" Visibility="{Binding ExistingForks, Converter={ui:HasItemsVisibilityConverter}}"> |
77 | | - <TextBlock DockPanel.Dock="Top" Margin="8 0"> |
| 78 | + <DockPanel Grid.Row="3" |
| 79 | + Margin="0 16 0 0" |
| 80 | + Visibility="{Binding ExistingForks, Converter={ui:HasItemsVisibilityConverter}}"> |
| 81 | + <TextBlock DockPanel.Dock="Top" Margin="8 0"> |
78 | 82 | <Run FontWeight="SemiBold">Can't find what you're looking for?</Run> |
79 | 83 | <LineBreak/> |
80 | 84 | <Run>You have existing forks of this repository:</Run> |
81 | | - </TextBlock> |
| 85 | + </TextBlock> |
82 | 86 |
|
83 | | - <ItemsControl ItemsSource="{Binding ExistingForks}" DockPanel.Dock="Bottom" MaxHeight="120" Padding="8 0" ScrollViewer.VerticalScrollBarVisibility="Auto"> |
84 | | - <ItemsControl.ItemTemplate> |
85 | | - <DataTemplate> |
86 | | - <StackPanel Orientation="Horizontal" Margin="0 4 0 0"> |
87 | | - <ui:OcticonImage Icon="repo_forked" Margin="0,0,2,-2"/> |
88 | | - <TextBlock Text="{Binding Owner, Mode=OneWay}"/> |
89 | | - <TextBlock Text="/"/> |
90 | | - <TextBlock Text="{Binding Name, Mode=OneWay}"/> |
91 | | - </StackPanel> |
92 | | - </DataTemplate> |
93 | | - </ItemsControl.ItemTemplate> |
94 | | - </ItemsControl> |
95 | | - </DockPanel> |
| 87 | + <ItemsControl ItemsSource="{Binding ExistingForks}" DockPanel.Dock="Bottom" MaxHeight="120" Padding="8 0" ScrollViewer.VerticalScrollBarVisibility="Auto"> |
| 88 | + <ItemsControl.ItemTemplate> |
| 89 | + <DataTemplate> |
| 90 | + <StackPanel Orientation="Horizontal" Margin="0 4 0 0"> |
| 91 | + <ui:OcticonImage Icon="repo_forked" Margin="0,0,2,-2"/> |
| 92 | + <TextBlock Text="{Binding Owner, Mode=OneWay}"/> |
| 93 | + <TextBlock Text="/"/> |
| 94 | + <TextBlock Text="{Binding Name, Mode=OneWay}"/> |
| 95 | + </StackPanel> |
| 96 | + </DataTemplate> |
| 97 | + </ItemsControl.ItemTemplate> |
| 98 | + </ItemsControl> |
96 | 99 | </DockPanel> |
97 | 100 | </Grid> |
98 | 101 | </UserControl> |
0 commit comments