|
|
@ -18,54 +18,35 @@ |
|
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> |
|
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> |
|
|
|
|
|
|
|
|
|
|
|
<Page.Resources> |
|
|
|
<Page.Resources> |
|
|
|
<DataTemplate DataType="{x:Type models:CheckpointFile}" x:Key="CheckpointCardDataTemplate"> |
|
|
|
<DataTemplate DataType="{x:Type models:CheckpointFile}" x:Key="CheckpointFileDataTemplate"> |
|
|
|
<ui:Card Width="256"> |
|
|
|
<ui:CardAction Height="96" Width="240"> |
|
|
|
<Grid> |
|
|
|
<StackPanel Orientation="Vertical"> |
|
|
|
<Grid.ColumnDefinitions> |
|
|
|
<ui:Image |
|
|
|
<ColumnDefinition Width="*" /> |
|
|
|
CornerRadius="4" |
|
|
|
<ColumnDefinition Width="0.2*" /> |
|
|
|
Margin="4,4,4,8" |
|
|
|
</Grid.ColumnDefinitions> |
|
|
|
MinHeight="256" |
|
|
|
<StackPanel Orientation="Vertical"> |
|
|
|
MinWidth="200" |
|
|
|
<ui:Image |
|
|
|
Source="{Binding PreviewImage}" |
|
|
|
CornerRadius="4" |
|
|
|
Stretch="UniformToFill" |
|
|
|
Margin="4,4,4,8" |
|
|
|
Visibility="Collapsed" |
|
|
|
MinHeight="256" |
|
|
|
Width="128" /> |
|
|
|
MinWidth="200" |
|
|
|
<TextBlock |
|
|
|
Source="{Binding PreviewImage}" |
|
|
|
Foreground="{DynamicResource TextFillColorPrimaryBrush}" |
|
|
|
Stretch="UniformToFill" |
|
|
|
Margin="0,0,0,0" |
|
|
|
Visibility="Collapsed" |
|
|
|
Text="{Binding Title}" |
|
|
|
Width="128" /> |
|
|
|
VerticalAlignment="Center" /> |
|
|
|
<TextBlock |
|
|
|
<TextBlock |
|
|
|
Foreground="{DynamicResource TextFillColorPrimaryBrush}" |
|
|
|
FontSize="11" |
|
|
|
Margin="0,0,0,0" |
|
|
|
Foreground="{DynamicResource TextFillColorTertiaryBrush}" |
|
|
|
Text="{Binding Title}" |
|
|
|
Margin="0,2,0,0" |
|
|
|
VerticalAlignment="Center" /> |
|
|
|
Text="{Binding FileName}" |
|
|
|
<TextBlock |
|
|
|
VerticalAlignment="Center" /> |
|
|
|
FontSize="11" |
|
|
|
</StackPanel> |
|
|
|
Foreground="{DynamicResource TextFillColorTertiaryBrush}" |
|
|
|
</ui:CardAction> |
|
|
|
Margin="0,2,0,0" |
|
|
|
|
|
|
|
Text="{Binding FileName}" |
|
|
|
|
|
|
|
VerticalAlignment="Center" /> |
|
|
|
|
|
|
|
</StackPanel> |
|
|
|
|
|
|
|
<ui:DropDownButton Grid.Column="1" Margin="16,0,0,0"> |
|
|
|
|
|
|
|
<ui:DropDownButton.Style> |
|
|
|
|
|
|
|
<Style BasedOn="{StaticResource {x:Type ui:DropDownButton}}" TargetType="{x:Type ui:DropDownButton}"> |
|
|
|
|
|
|
|
<Setter Property="Visibility" Value="Hidden" /> |
|
|
|
|
|
|
|
<Style.Triggers> |
|
|
|
|
|
|
|
<DataTrigger Binding="{Binding IsMouseOver, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type ui:Card}}}" Value="True"> |
|
|
|
|
|
|
|
<Setter Property="Visibility" Value="Visible" /> |
|
|
|
|
|
|
|
</DataTrigger> |
|
|
|
|
|
|
|
</Style.Triggers> |
|
|
|
|
|
|
|
</Style> |
|
|
|
|
|
|
|
</ui:DropDownButton.Style> |
|
|
|
|
|
|
|
<ui:SymbolIcon Symbol="ChevronDown24" /> |
|
|
|
|
|
|
|
</ui:DropDownButton> |
|
|
|
|
|
|
|
</Grid> |
|
|
|
|
|
|
|
</ui:Card> |
|
|
|
|
|
|
|
</DataTemplate> |
|
|
|
</DataTemplate> |
|
|
|
|
|
|
|
|
|
|
|
<DataTemplate DataType="{x:Type models:CheckpointFolder}" x:Key="CheckpointFolderCardGridDataTemplate"> |
|
|
|
<DataTemplate DataType="{x:Type models:CheckpointFolder}" x:Key="CheckpointFolderGridDataTemplate"> |
|
|
|
<ui:CardExpander |
|
|
|
<Expander |
|
|
|
AllowDrop="True" |
|
|
|
AllowDrop="True" |
|
|
|
Drop="FolderCard_OnDrop" |
|
|
|
Drop="FolderCard_OnDrop" |
|
|
|
Header="{Binding Title}" |
|
|
|
Header="{Binding Title}" |
|
|
@ -76,28 +57,38 @@ |
|
|
|
PreviewDragOver="FolderCard_OnPreviewDragOver" |
|
|
|
PreviewDragOver="FolderCard_OnPreviewDragOver" |
|
|
|
PreviewDrop="FolderCard_OnPreviewDrop"> |
|
|
|
PreviewDrop="FolderCard_OnPreviewDrop"> |
|
|
|
<ui:VirtualizingGridView |
|
|
|
<ui:VirtualizingGridView |
|
|
|
ItemTemplate="{StaticResource CheckpointCardDataTemplate}" |
|
|
|
ItemTemplate="{StaticResource CheckpointFileDataTemplate}" |
|
|
|
ItemsSource="{Binding CheckpointFiles}" |
|
|
|
ItemsSource="{Binding CheckpointFiles}" |
|
|
|
Padding="5" |
|
|
|
Padding="5" |
|
|
|
|
|
|
|
PreviewMouseWheel="VirtualizingGridView_OnPreviewMouseWheel" |
|
|
|
SpacingMode="StartAndEndOnly" /> |
|
|
|
SpacingMode="StartAndEndOnly" /> |
|
|
|
</ui:CardExpander> |
|
|
|
</Expander> |
|
|
|
</DataTemplate> |
|
|
|
</DataTemplate> |
|
|
|
|
|
|
|
|
|
|
|
<DataTemplate DataType="{x:Type models:CheckpointFolder}" x:Key="CheckpointFolderCardDataTemplate"> |
|
|
|
<DataTemplate DataType="{x:Type models:CheckpointFolder}" x:Key="CheckpointFolderDataTemplate"> |
|
|
|
<ContentControl Content="{Binding}"> |
|
|
|
<ContentControl Content="{Binding}"> |
|
|
|
<ContentControl.Style> |
|
|
|
<ContentControl.Style> |
|
|
|
<Style TargetType="{x:Type ContentControl}"> |
|
|
|
<Style TargetType="{x:Type ContentControl}"> |
|
|
|
<Setter Property="ContentTemplate" Value="{StaticResource CheckpointFolderCardGridDataTemplate}" /> |
|
|
|
<Setter Property="ContentTemplate" Value="{StaticResource CheckpointFolderGridDataTemplate}" /> |
|
|
|
</Style> |
|
|
|
</Style> |
|
|
|
</ContentControl.Style> |
|
|
|
</ContentControl.Style> |
|
|
|
</ContentControl> |
|
|
|
</ContentControl> |
|
|
|
</DataTemplate> |
|
|
|
</DataTemplate> |
|
|
|
</Page.Resources> |
|
|
|
</Page.Resources> |
|
|
|
|
|
|
|
|
|
|
|
<!-- Option Cards --> |
|
|
|
<!-- Folder Cards --> |
|
|
|
<ItemsControl |
|
|
|
<ui:DynamicScrollViewer |
|
|
|
HorizontalAlignment="Stretch" |
|
|
|
CanContentScroll="True" |
|
|
|
ItemTemplate="{StaticResource CheckpointFolderCardGridDataTemplate}" |
|
|
|
HorizontalScrollBarVisibility="Disabled" |
|
|
|
ItemsSource="{Binding CheckpointFolders}" |
|
|
|
VerticalScrollBarVisibility="Auto"> |
|
|
|
Margin="16,16,16,16" /> |
|
|
|
<Grid> |
|
|
|
|
|
|
|
<StackPanel Orientation="Vertical"> |
|
|
|
|
|
|
|
<ItemsControl |
|
|
|
|
|
|
|
HorizontalAlignment="Stretch" |
|
|
|
|
|
|
|
ItemTemplate="{StaticResource CheckpointFolderGridDataTemplate}" |
|
|
|
|
|
|
|
ItemsSource="{Binding CheckpointFolders, Mode=OneWay}" |
|
|
|
|
|
|
|
Margin="16,16,16,16" /> |
|
|
|
|
|
|
|
</StackPanel> |
|
|
|
|
|
|
|
</Grid> |
|
|
|
|
|
|
|
</ui:DynamicScrollViewer> |
|
|
|
</Page> |
|
|
|
</Page> |
|
|
|