Skip to content
This repository was archived by the owner on Jun 21, 2023. It is now read-only.

Commit 501f239

Browse files
committed
Fixed ListBox scrolling.
And formatted document to have consistent indentation.
1 parent c12e7dd commit 501f239

File tree

1 file changed

+48
-45
lines changed

1 file changed

+48
-45
lines changed

src/GitHub.VisualStudio/Views/Dialog/ForkRepositorySelectView.xaml

Lines changed: 48 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -27,72 +27,75 @@
2727
<Grid.RowDefinitions>
2828
<RowDefinition Height="Auto"/>
2929
<RowDefinition Height="Auto"/>
30+
<RowDefinition Height="*"/>
31+
<RowDefinition Height="Auto"/>
3032
</Grid.RowDefinitions>
3133

32-
<DockPanel Grid.Row="0">
33-
<TextBlock DockPanel.Dock="Top" FontSize="16" Margin="8">
34+
<TextBlock Grid.Row="0" FontSize="16" Margin="8">
3435
Where should we fork this repository?
35-
</TextBlock>
36+
</TextBlock>
3637

37-
<ui:GitHubProgressBar DockPanel.Dock="Top"
38+
<ui:GitHubProgressBar Grid.Row="1"
3839
Foreground="{DynamicResource GitHubAccentBrush}"
3940
IsIndeterminate="True"
4041
Style="{DynamicResource GitHubProgressBar}"
4142
Visibility="{Binding IsLoading, Converter={ui:BooleanToHiddenVisibilityConverter}}"/>
4243

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"
6264
Margin="4,0,4,4"
6365
Text="{Binding Login, StringFormat=@{0}}"
6466
TextAlignment="Center"
6567
TextTrimming="CharacterEllipsis"/>
66-
<Image
68+
<Image
6769
Margin="4"
6870
MaxWidth="100"
6971
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>
7577

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">
7882
<Run FontWeight="SemiBold">Can't find what you're looking for?</Run>
7983
<LineBreak/>
8084
<Run>You have existing forks of this repository:</Run>
81-
</TextBlock>
85+
</TextBlock>
8286

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>
9699
</DockPanel>
97100
</Grid>
98101
</UserControl>

0 commit comments

Comments
 (0)