|
16 | 16 |
|
17 | 17 | <Grid |
18 | 18 | Width="240" |
| 19 | + Padding="12" |
19 | 20 | AllowDrop="True" |
20 | 21 | Background="{ThemeResource App.Theme.InfoPane.BackgroundBrush}" |
21 | 22 | BackgroundSizing="InnerBorderEdge" |
|
27 | 28 | RowSpacing="8"> |
28 | 29 |
|
29 | 30 | <Grid.RowDefinitions> |
| 31 | + <RowDefinition Height="Auto" /> |
30 | 32 | <RowDefinition Height="*" /> |
31 | 33 | <RowDefinition Height="Auto" /> |
32 | 34 | </Grid.RowDefinitions> |
33 | 35 |
|
34 | | - <StackPanel |
35 | | - Grid.Row="0" |
36 | | - Padding="12" |
37 | | - Spacing="8"> |
| 36 | + <StackPanel Grid.Row="0" Spacing="8"> |
38 | 37 |
|
39 | 38 | <!-- Title --> |
40 | 39 | <TextBlock |
41 | 40 | HorizontalAlignment="Center" |
42 | | - Foreground="{ThemeResource TextFillColorSecondaryBrush}" |
43 | | - Style="{StaticResource App.Theme.BodyStrongTextBlockStyle}" |
| 41 | + Foreground="{ThemeResource TextFillColorTertiaryBrush}" |
| 42 | + Style="{StaticResource App.Theme.BodyTextBlockStyle}" |
44 | 43 | Text="{helpers:ResourceString Name=Shelf}" /> |
45 | 44 |
|
46 | 45 | <!-- (Divider) --> |
47 | 46 | <Border Height="1" Background="{ThemeResource DividerStrokeColorDefaultBrush}" /> |
48 | 47 |
|
49 | | - <!-- Items List --> |
50 | | - <ListView |
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 | | - |
60 | | - <StackPanel.ContextFlyout> |
61 | | - <MenuFlyout> |
62 | | - <MenuFlyoutItem Command="{x:Bind RemoveCommand}" Text="{helpers:ResourceString Name=Remove}"> |
63 | | - <MenuFlyoutItem.Icon> |
64 | | - <FontIcon Glyph="" /> |
65 | | - </MenuFlyoutItem.Icon> |
66 | | - </MenuFlyoutItem> |
67 | | - </MenuFlyout> |
68 | | - </StackPanel.ContextFlyout> |
69 | | - </StackPanel> |
70 | | - </DataTemplate> |
71 | | - </ListView.ItemTemplate> |
72 | | - </ListView> |
73 | 48 | </StackPanel> |
74 | 49 |
|
75 | | - |
76 | | - <StackPanel |
| 50 | + <!-- Items List --> |
| 51 | + <ListView |
77 | 52 | Grid.Row="1" |
78 | | - Padding="12,8,12,8" |
79 | | - Spacing="4"> |
| 53 | + DragItemsStarting="ListView_DragItemsStarting" |
| 54 | + ItemsSource="{x:Bind ItemsSource, Mode=OneWay}" |
| 55 | + ScrollViewer.VerticalScrollBarVisibility="Auto" |
| 56 | + ScrollViewer.VerticalScrollMode="Auto" |
| 57 | + SelectionMode="Extended"> |
| 58 | + <ListView.ItemTemplate> |
| 59 | + <DataTemplate x:DataType="data:ShelfItem"> |
| 60 | + <StackPanel Orientation="Horizontal" Spacing="8"> |
| 61 | + <Image Height="20" Source="{x:Bind Icon, Mode=OneWay, Converter={StaticResource ImageModelToImageConverter}}" /> |
| 62 | + <TextBlock Text="{x:Bind Name, Mode=OneWay}" /> |
| 63 | + |
| 64 | + <StackPanel.ContextFlyout> |
| 65 | + <MenuFlyout> |
| 66 | + <MenuFlyoutItem Command="{x:Bind RemoveCommand}" Text="{helpers:ResourceString Name=RemoveFromShelf}"> |
| 67 | + <MenuFlyoutItem.Icon> |
| 68 | + <FontIcon Glyph="" /> |
| 69 | + </MenuFlyoutItem.Icon> |
| 70 | + </MenuFlyoutItem> |
| 71 | + </MenuFlyout> |
| 72 | + </StackPanel.ContextFlyout> |
| 73 | + </StackPanel> |
| 74 | + </DataTemplate> |
| 75 | + </ListView.ItemTemplate> |
| 76 | + |
| 77 | + <ListView.ItemContainerStyle> |
| 78 | + <Style BasedOn="{StaticResource DefaultListViewItemStyle}" TargetType="ListViewItem"> |
| 79 | + <Setter Property="Margin" Value="-4,0,-4,0" /> |
| 80 | + <Setter Property="MinHeight" Value="36" /> |
| 81 | + </Style> |
| 82 | + </ListView.ItemContainerStyle> |
| 83 | + </ListView> |
| 84 | + |
| 85 | + |
| 86 | + <StackPanel Grid.Row="2" Spacing="4"> |
80 | 87 |
|
81 | 88 | <!-- (Divider) --> |
82 | 89 | <Border Height="1" Background="{ThemeResource DividerStrokeColorDefaultBrush}" /> |
|
87 | 94 | VerticalAlignment="Center" |
88 | 95 | Command="{x:Bind ClearCommand, Mode=OneWay}" |
89 | 96 | Content="{helpers:ResourceString Name=ClearItems}" /> |
| 97 | + |
90 | 98 | </StackPanel> |
91 | 99 | </Grid> |
92 | 100 | </UserControl> |
0 commit comments