Skip to content

Commit a39e0f4

Browse files
committed
Improved xaml
1 parent 5cd2700 commit a39e0f4

File tree

1 file changed

+32
-29
lines changed

1 file changed

+32
-29
lines changed

src/Files.App/UserControls/Pane/ShelfPane.xaml

Lines changed: 32 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616

1717
<Grid
1818
Width="240"
19-
Padding="16,0"
2019
AllowDrop="True"
2120
Background="{ThemeResource App.Theme.InfoPane.BackgroundBrush}"
2221
BackgroundSizing="InnerBorderEdge"
@@ -28,45 +27,49 @@
2827
RowSpacing="8">
2928

3029
<Grid.RowDefinitions>
31-
<RowDefinition Height="Auto" />
32-
<RowDefinition />
30+
<RowDefinition Height="*" />
3331
<RowDefinition Height="Auto" />
3432
</Grid.RowDefinitions>
3533

36-
<!-- Title -->
37-
<Border
34+
<StackPanel
3835
Grid.Row="0"
3936
Padding="12"
40-
BorderBrush="{ThemeResource ControlStrokeColorSecondaryBrush}"
41-
BorderThickness="0,0,0,1">
37+
Spacing="8">
38+
<!-- Title -->
4239
<TextBlock
4340
HorizontalAlignment="Center"
44-
Opacity="0.8"
41+
Foreground="{ThemeResource TextFillColorSecondaryBrush}"
42+
Style="{StaticResource App.Theme.BodyStrongTextBlockStyle}"
4543
Text="{helpers:ResourceString Name=Shelf}" />
46-
</Border>
4744

48-
<!-- Items List -->
49-
<ListView
50-
Grid.Row="1"
51-
DragItemsStarting="ListView_DragItemsStarting"
52-
ItemsSource="{x:Bind ItemsSource, Mode=OneWay}"
53-
SelectionMode="Extended">
54-
<ListView.ItemTemplate>
55-
<DataTemplate x:DataType="data:ShelfItem">
56-
<StackPanel Orientation="Horizontal" Spacing="8">
57-
<Image Height="20" Source="{x:Bind Icon, Mode=OneWay, Converter={StaticResource ImageModelToImageConverter}}" />
58-
<TextBlock Text="{x:Bind Name, Mode=OneWay}" />
59-
</StackPanel>
60-
</DataTemplate>
61-
</ListView.ItemTemplate>
62-
</ListView>
45+
<!-- (Divider) -->
46+
<Border Height="1" Background="{ThemeResource DividerStrokeColorDefaultBrush}" />
47+
48+
<!-- Items List -->
49+
<ListView
50+
DragItemsStarting="ListView_DragItemsStarting"
51+
ItemsSource="{x:Bind ItemsSource, Mode=OneWay}"
52+
SelectionMode="Extended">
53+
<ListView.ItemTemplate>
54+
<DataTemplate x:DataType="data:ShelfItem">
55+
<StackPanel Orientation="Horizontal" Spacing="8">
56+
<Image Height="20" Source="{x:Bind Icon, Mode=OneWay, Converter={StaticResource ImageModelToImageConverter}}" />
57+
<TextBlock Text="{x:Bind Name, Mode=OneWay}" />
58+
</StackPanel>
59+
</DataTemplate>
60+
</ListView.ItemTemplate>
61+
</ListView>
62+
</StackPanel>
63+
6364

64-
<!-- Bottom Actions -->
6565
<StackPanel
66-
Grid.Row="2"
67-
Padding="8"
68-
BorderBrush="{ThemeResource ControlStrokeColorSecondaryBrush}"
69-
BorderThickness="0,1,0,0">
66+
Grid.Row="1"
67+
Padding="12,8,12,8"
68+
Spacing="4">
69+
<!-- (Divider) -->
70+
<Border Height="1" Background="{ThemeResource DividerStrokeColorDefaultBrush}" />
71+
72+
<!-- Bottom Actions -->
7073
<HyperlinkButton
7174
HorizontalAlignment="Center"
7275
VerticalAlignment="Center"

0 commit comments

Comments
 (0)