|
5 | 5 | xmlns:d="http://schemas.microsoft.com/expression/blend/2008" |
6 | 6 | xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" |
7 | 7 | xmlns:b="http://schemas.microsoft.com/xaml/behaviors" |
| 8 | + xmlns:behaviors="clr-namespace:ExHyperV.Behaviors" |
8 | 9 | mc:Ignorable="d" d:DesignHeight="600" d:DesignWidth="800"> |
9 | 10 |
|
10 | 11 | <Grid> |
|
13 | 14 | <RowDefinition Height="*"/> |
14 | 15 | </Grid.RowDefinitions> |
15 | 16 |
|
16 | | - <Grid Grid.Row="0" Margin="24,16,24,12"> |
| 17 | + <Grid Grid.Row="0" Margin="24,20,24,16"> |
17 | 18 | <Grid.ColumnDefinitions> |
18 | 19 | <ColumnDefinition Width="*"/> |
19 | 20 | <ColumnDefinition Width="Auto"/> |
20 | 21 | </Grid.ColumnDefinitions> |
21 | 22 | <StackPanel VerticalAlignment="Center"> |
22 | | - <TextBlock Text="引导顺序" FontSize="20" FontWeight="SemiBold" Foreground="{ui:ThemeResource TextFillColorPrimaryBrush}"/> |
23 | | - <TextBlock Text="按住卡片上下拖动以调整启动优先级" FontSize="12" Opacity="0.6" Margin="0,4,0,0" Foreground="{ui:ThemeResource TextFillColorPrimaryBrush}"/> |
| 23 | + <TextBlock Text="引导顺序" FontSize="22" FontWeight="Normal" Foreground="{ui:ThemeResource TextFillColorPrimaryBrush}"/> |
| 24 | + <TextBlock Text="上下拖动以调整优先级" FontSize="13" Opacity="0.6" Margin="0,6,0,0" Foreground="{ui:ThemeResource TextFillColorPrimaryBrush}"/> |
24 | 25 | </StackPanel> |
25 | 26 | <ui:Button Grid.Column="1" Appearance="Transparent" Padding="8" Command="{Binding GoBackToDashboardCommand}"> |
26 | | - <ui:SymbolIcon Symbol="ArrowLeft24" FontSize="18"/> |
| 27 | + <ui:SymbolIcon Symbol="ArrowLeft24" FontSize="20"/> |
27 | 28 | </ui:Button> |
28 | 29 | </Grid> |
29 | 30 |
|
30 | 31 | <ListBox x:Name="BootListBox" |
31 | 32 | Grid.Row="1" |
32 | | - Margin="24,8,24,24" |
| 33 | + Margin="24,4,24,24" |
33 | 34 | Background="Transparent" |
34 | 35 | BorderThickness="0" |
35 | 36 | ItemsSource="{Binding SelectedVm.BootOrderItems}" |
36 | 37 | AllowDrop="True" |
37 | | - DragOver="BootListBox_DragOver" |
38 | | - Drop="BootListBox_Drop" |
39 | 38 | ScrollViewer.HorizontalScrollBarVisibility="Disabled"> |
| 39 | + |
| 40 | + <b:Interaction.Behaviors> |
| 41 | + <behaviors:ListBoxDragDropBehavior |
| 42 | + MoveItemCommand="{Binding ReorderBootItemCommand}" |
| 43 | + DropCompletedCommand="{Binding SaveBootOrderCommand}"/> |
| 44 | + </b:Interaction.Behaviors> |
| 45 | + |
40 | 46 | <ListBox.ItemsPanel> |
41 | 47 | <ItemsPanelTemplate> |
42 | 48 | <StackPanel x:Name="ItemsPanel" IsItemsHost="True"> |
|
55 | 61 | <Style TargetType="ListBoxItem"> |
56 | 62 | <Setter Property="Background" Value="Transparent"/> |
57 | 63 | <Setter Property="Padding" Value="0"/> |
58 | | - <Setter Property="Margin" Value="0,0,0,8"/> |
| 64 | + <Setter Property="Margin" Value="0,0,0,10"/> |
59 | 65 | <Setter Property="HorizontalContentAlignment" Value="Stretch"/> |
60 | | - <EventSetter Event="PreviewMouseLeftButtonDown" Handler="Card_PreviewMouseLeftButtonDown"/> |
61 | | - <EventSetter Event="PreviewMouseMove" Handler="Card_PreviewMouseMove"/> |
62 | 66 | <Setter Property="Template"> |
63 | 67 | <Setter.Value> |
64 | 68 | <ControlTemplate TargetType="ListBoxItem"> |
|
75 | 79 | <DataTemplate> |
76 | 80 | <Border Background="{ui:ThemeResource ControlFillColorDefaultBrush}" |
77 | 81 | BorderBrush="{ui:ThemeResource CardStrokeColorDefaultBrush}" |
78 | | - BorderThickness="1" CornerRadius="8" Padding="16,20"> |
| 82 | + BorderThickness="1" CornerRadius="8" Padding="18,18"> |
79 | 83 | <Grid> |
80 | 84 | <Grid.ColumnDefinitions> |
81 | 85 | <ColumnDefinition Width="Auto"/> |
82 | 86 | <ColumnDefinition Width="*"/> |
83 | 87 | <ColumnDefinition Width="Auto"/> |
84 | 88 | </Grid.ColumnDefinitions> |
85 | 89 |
|
86 | | - <ui:FontIcon Grid.Column="0" Glyph="{Binding Icon}" FontSize="20" Margin="0,0,16,0" Opacity="0.8"/> |
| 90 | + <ui:FontIcon Grid.Column="0" |
| 91 | + Glyph="{Binding Icon}" |
| 92 | + FontSize="20" |
| 93 | + Margin="0,0,18,0" |
| 94 | + FontFamily="{DynamicResource SegoeFluentIcons}" |
| 95 | + Foreground="{ui:ThemeResource TextFillColorPrimaryBrush}"/> |
87 | 96 |
|
88 | | - <StackPanel Grid.Column="1" VerticalAlignment="Center"> |
89 | | - <TextBlock Text="{Binding Name}" FontSize="16" FontWeight="Medium" Foreground="{ui:ThemeResource TextFillColorPrimaryBrush}"/> |
90 | | - <TextBlock Text="{Binding Description}" FontSize="12" Opacity="0.5" Margin="0,4,0,0" Foreground="{ui:ThemeResource TextFillColorPrimaryBrush}"/> |
| 97 | + <StackPanel Grid.Column="1" Orientation="Horizontal" VerticalAlignment="Center"> |
| 98 | + <TextBlock Text="{Binding Name}" FontSize="15" FontWeight="Medium" Foreground="{ui:ThemeResource TextFillColorPrimaryBrush}"/> |
| 99 | + <TextBlock Text="{Binding Description}" FontSize="14" Opacity="0.5" Margin="16,0,0,0" VerticalAlignment="Center" Foreground="{ui:ThemeResource TextFillColorPrimaryBrush}" TextTrimming="CharacterEllipsis"/> |
91 | 100 | </StackPanel> |
92 | 101 |
|
93 | | - <ui:FontIcon Grid.Column="2" Glyph="" FontFamily="{DynamicResource SegoeFluentIcons}" FontSize="18" Opacity="0.4" VerticalAlignment="Center"/> |
| 102 | + <ui:FontIcon Grid.Column="2" |
| 103 | + Glyph="" |
| 104 | + FontFamily="{DynamicResource SegoeFluentIcons}" |
| 105 | + FontSize="18" |
| 106 | + Foreground="{ui:ThemeResource TextFillColorSecondaryBrush}" |
| 107 | + VerticalAlignment="Center"/> |
94 | 108 | </Grid> |
95 | 109 | </Border> |
96 | 110 | </DataTemplate> |
|
0 commit comments