|
|
@ -5,14 +5,18 @@ |
|
|
|
d:DesignHeight="1000" |
|
|
|
d:DesignHeight="1000" |
|
|
|
d:DesignWidth="650" |
|
|
|
d:DesignWidth="650" |
|
|
|
mc:Ignorable="d" |
|
|
|
mc:Ignorable="d" |
|
|
|
|
|
|
|
ui:Design.Background="{DynamicResource ApplicationBackgroundBrush}" |
|
|
|
|
|
|
|
ui:Design.Foreground="{DynamicResource TextFillColorPrimaryBrush}" |
|
|
|
x:Class="StabilityMatrix.CheckpointManagerPage" |
|
|
|
x:Class="StabilityMatrix.CheckpointManagerPage" |
|
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
|
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
|
|
|
|
|
|
|
xmlns:controls="clr-namespace:StabilityMatrix.Controls" |
|
|
|
xmlns:converters="clr-namespace:StabilityMatrix.Converters" |
|
|
|
xmlns:converters="clr-namespace:StabilityMatrix.Converters" |
|
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" |
|
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" |
|
|
|
xmlns:designData="clr-namespace:StabilityMatrix.DesignData" |
|
|
|
xmlns:designData="clr-namespace:StabilityMatrix.DesignData" |
|
|
|
xmlns:i="http://schemas.microsoft.com/xaml/behaviors" |
|
|
|
xmlns:i="http://schemas.microsoft.com/xaml/behaviors" |
|
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" |
|
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" |
|
|
|
xmlns:models="clr-namespace:StabilityMatrix.Models" |
|
|
|
xmlns:models="clr-namespace:StabilityMatrix.Models" |
|
|
|
|
|
|
|
xmlns:system="clr-namespace:System;assembly=System.Runtime" |
|
|
|
xmlns:ui="http://schemas.lepo.co/wpfui/2022/xaml" |
|
|
|
xmlns:ui="http://schemas.lepo.co/wpfui/2022/xaml" |
|
|
|
xmlns:viewModels="clr-namespace:StabilityMatrix.ViewModels" |
|
|
|
xmlns:viewModels="clr-namespace:StabilityMatrix.ViewModels" |
|
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> |
|
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> |
|
|
@ -26,6 +30,10 @@ |
|
|
|
<converters:BoolNegationConverter /> |
|
|
|
<converters:BoolNegationConverter /> |
|
|
|
<converters:BooleanToHiddenVisibleConverter /> |
|
|
|
<converters:BooleanToHiddenVisibleConverter /> |
|
|
|
</converters:ValueConverterGroup> |
|
|
|
</converters:ValueConverterGroup> |
|
|
|
|
|
|
|
<converters:ValueConverterGroup x:Key="InvertBoolToVisibilityConverter"> |
|
|
|
|
|
|
|
<converters:BoolNegationConverter /> |
|
|
|
|
|
|
|
<BooleanToVisibilityConverter /> |
|
|
|
|
|
|
|
</converters:ValueConverterGroup> |
|
|
|
|
|
|
|
|
|
|
|
<DropShadowEffect |
|
|
|
<DropShadowEffect |
|
|
|
BlurRadius="8" |
|
|
|
BlurRadius="8" |
|
|
@ -35,61 +43,120 @@ |
|
|
|
ShadowDepth="0" |
|
|
|
ShadowDepth="0" |
|
|
|
x:Key="TextDropShadowEffect" /> |
|
|
|
x:Key="TextDropShadowEffect" /> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- Template for a single badge --> |
|
|
|
|
|
|
|
<DataTemplate DataType="{x:Type system:String}" x:Key="BadgeTemplate"> |
|
|
|
|
|
|
|
<ui:Card |
|
|
|
|
|
|
|
Height="18" |
|
|
|
|
|
|
|
Margin="4,0,0,0" |
|
|
|
|
|
|
|
Padding="3" |
|
|
|
|
|
|
|
Visibility="{Binding Converter={StaticResource StringNullOrEmptyToVisibilityConverter}, FallbackValue=Collapsed}" |
|
|
|
|
|
|
|
Width="40"> |
|
|
|
|
|
|
|
<TextBlock |
|
|
|
|
|
|
|
FontSize="10" |
|
|
|
|
|
|
|
FontWeight="Medium" |
|
|
|
|
|
|
|
Foreground="{DynamicResource TextFillColorSecondaryBrush}" |
|
|
|
|
|
|
|
HorizontalAlignment="Center" |
|
|
|
|
|
|
|
Text="{Binding}" |
|
|
|
|
|
|
|
VerticalAlignment="Center" /> |
|
|
|
|
|
|
|
</ui:Card> |
|
|
|
|
|
|
|
</DataTemplate> |
|
|
|
|
|
|
|
|
|
|
|
<DataTemplate DataType="{x:Type models:CheckpointFile}" x:Key="CheckpointFileDataTemplate"> |
|
|
|
<DataTemplate DataType="{x:Type models:CheckpointFile}" x:Key="CheckpointFileDataTemplate"> |
|
|
|
<Border Background="Transparent" BorderThickness="0"> |
|
|
|
<Border |
|
|
|
|
|
|
|
Background="Transparent" |
|
|
|
|
|
|
|
BorderThickness="0" |
|
|
|
|
|
|
|
Margin="8"> |
|
|
|
<i:Interaction.Behaviors> |
|
|
|
<i:Interaction.Behaviors> |
|
|
|
<i:MouseDragElementBehavior /> |
|
|
|
<i:MouseDragElementBehavior /> |
|
|
|
</i:Interaction.Behaviors> |
|
|
|
</i:Interaction.Behaviors> |
|
|
|
<ui:Card |
|
|
|
<ui:Card Width="260"> |
|
|
|
Margin="8,8,8,8" |
|
|
|
|
|
|
|
MaxHeight="512" |
|
|
|
|
|
|
|
MaxWidth="300" |
|
|
|
|
|
|
|
MinWidth="240" |
|
|
|
|
|
|
|
Padding="12,16"> |
|
|
|
|
|
|
|
<ui:Card.ContextMenu> |
|
|
|
<ui:Card.ContextMenu> |
|
|
|
<ContextMenu> |
|
|
|
<ContextMenu> |
|
|
|
<MenuItem Header="Rename" /> |
|
|
|
<!-- ReSharper disable once Xaml.RedundantResource --> |
|
|
|
|
|
|
|
<MenuItem Command="{Binding RenameCommand}" Header="Rename" /> |
|
|
|
|
|
|
|
<!-- ReSharper disable once Xaml.RedundantResource --> |
|
|
|
<MenuItem Command="{Binding DeleteCommand}" Header="Delete" /> |
|
|
|
<MenuItem Command="{Binding DeleteCommand}" Header="Delete" /> |
|
|
|
</ContextMenu> |
|
|
|
</ContextMenu> |
|
|
|
</ui:Card.ContextMenu> |
|
|
|
</ui:Card.ContextMenu> |
|
|
|
<Grid> |
|
|
|
<Grid> |
|
|
|
<!-- Main contents, hidden when IsLoading is true --> |
|
|
|
<!-- Main contents, hidden when IsLoading is true --> |
|
|
|
<VirtualizingStackPanel Orientation="Vertical"> |
|
|
|
<StackPanel MinHeight="70"> |
|
|
|
<ui:Image |
|
|
|
<ui:Image |
|
|
|
CornerRadius="4" |
|
|
|
CornerRadius="4" |
|
|
|
Margin="0,0,0,8" |
|
|
|
Margin="0,0,0,8" |
|
|
|
Source="{Binding PreviewImagePath}" |
|
|
|
Source="{Binding PreviewImage}" |
|
|
|
Stretch="Uniform" |
|
|
|
Stretch="Uniform" |
|
|
|
Visibility="Collapsed" /> |
|
|
|
Visibility="Collapsed" /> |
|
|
|
<Grid |
|
|
|
<Grid Name="ModelInfoGrid" Visibility="{Binding IsLoading, Converter={StaticResource InvertAndVisibleOrHidden}}"> |
|
|
|
HorizontalAlignment="Stretch" |
|
|
|
|
|
|
|
Name="ModelInfoGrid" |
|
|
|
|
|
|
|
VerticalAlignment="Stretch" |
|
|
|
|
|
|
|
Visibility="{Binding IsLoading, Converter={StaticResource InvertAndVisibleOrHidden}}"> |
|
|
|
|
|
|
|
<Grid.ColumnDefinitions> |
|
|
|
<Grid.ColumnDefinitions> |
|
|
|
<ColumnDefinition Width="*" /> |
|
|
|
<ColumnDefinition Width="*" /> |
|
|
|
<ColumnDefinition Width="0.6*" /> |
|
|
|
<ColumnDefinition Width="*" /> |
|
|
|
|
|
|
|
<ColumnDefinition Width="*" /> |
|
|
|
|
|
|
|
<ColumnDefinition Width="*" /> |
|
|
|
|
|
|
|
<ColumnDefinition Width="*" /> |
|
|
|
</Grid.ColumnDefinitions> |
|
|
|
</Grid.ColumnDefinitions> |
|
|
|
<StackPanel Orientation="Vertical"> |
|
|
|
<Grid.RowDefinitions> |
|
|
|
|
|
|
|
<RowDefinition Height="*" /> |
|
|
|
|
|
|
|
<RowDefinition Height="0.1*" /> |
|
|
|
|
|
|
|
</Grid.RowDefinitions> |
|
|
|
|
|
|
|
<StackPanel |
|
|
|
|
|
|
|
Grid.ColumnSpan="4" |
|
|
|
|
|
|
|
HorizontalAlignment="Left" |
|
|
|
|
|
|
|
IsEnabled="True" |
|
|
|
|
|
|
|
Margin="4" |
|
|
|
|
|
|
|
Orientation="Vertical" |
|
|
|
|
|
|
|
ToolTipService.BetweenShowDelay="100" |
|
|
|
|
|
|
|
ToolTipService.InitialShowDelay="300"> |
|
|
|
|
|
|
|
<!-- Tooltip for title and version --> |
|
|
|
|
|
|
|
<StackPanel.ToolTip> |
|
|
|
|
|
|
|
<ToolTip Padding="8"> |
|
|
|
|
|
|
|
<VirtualizingStackPanel> |
|
|
|
|
|
|
|
<!-- Title --> |
|
|
|
|
|
|
|
<TextBlock |
|
|
|
|
|
|
|
FontSize="14" |
|
|
|
|
|
|
|
FontWeight="Medium" |
|
|
|
|
|
|
|
Foreground="{DynamicResource TextFillColorPrimaryBrush}" |
|
|
|
|
|
|
|
HorizontalAlignment="Left" |
|
|
|
|
|
|
|
Margin="0,0,0,4" |
|
|
|
|
|
|
|
Text="{Binding Title}" |
|
|
|
|
|
|
|
TextWrapping="WrapWithOverflow" /> |
|
|
|
|
|
|
|
<!-- Version --> |
|
|
|
|
|
|
|
<TextBlock |
|
|
|
|
|
|
|
FontSize="13" |
|
|
|
|
|
|
|
Foreground="{DynamicResource TextFillColorTertiaryBrush}" |
|
|
|
|
|
|
|
HorizontalAlignment="Left" |
|
|
|
|
|
|
|
Margin="0,0,0,4" |
|
|
|
|
|
|
|
Text="{Binding ConnectedModel.VersionName, FallbackValue=''}" |
|
|
|
|
|
|
|
TextWrapping="WrapWithOverflow" |
|
|
|
|
|
|
|
Visibility="{Binding IsConnectedModel, Converter={StaticResource BoolToVisibilityConverter}}" /> |
|
|
|
|
|
|
|
<!-- Image --> |
|
|
|
|
|
|
|
<ui:Image |
|
|
|
|
|
|
|
CornerRadius="4" |
|
|
|
|
|
|
|
Margin="0,0,0,4" |
|
|
|
|
|
|
|
Source="{Binding PreviewImage}" |
|
|
|
|
|
|
|
Stretch="Uniform" |
|
|
|
|
|
|
|
Visibility="{Binding IsConnectedModel, Converter={StaticResource BoolToVisibilityConverter}}" /> |
|
|
|
|
|
|
|
</VirtualizingStackPanel> |
|
|
|
|
|
|
|
</ToolTip> |
|
|
|
|
|
|
|
</StackPanel.ToolTip> |
|
|
|
<TextBlock |
|
|
|
<TextBlock |
|
|
|
Foreground="{DynamicResource TextFillColorPrimaryBrush}" |
|
|
|
Foreground="{DynamicResource TextFillColorPrimaryBrush}" |
|
|
|
|
|
|
|
HorizontalAlignment="Left" |
|
|
|
|
|
|
|
IsEnabled="True" |
|
|
|
|
|
|
|
MaxWidth="150" |
|
|
|
Text="{Binding Title}" |
|
|
|
Text="{Binding Title}" |
|
|
|
TextWrapping="WrapWithOverflow" /> |
|
|
|
TextTrimming="CharacterEllipsis" |
|
|
|
|
|
|
|
TextWrapping="NoWrap" /> |
|
|
|
<TextBlock |
|
|
|
<TextBlock |
|
|
|
FontSize="12" |
|
|
|
FontSize="13" |
|
|
|
Foreground="{DynamicResource TextFillColorTertiaryBrush}" |
|
|
|
Foreground="{DynamicResource TextFillColorTertiaryBrush}" |
|
|
|
|
|
|
|
HorizontalAlignment="Left" |
|
|
|
|
|
|
|
IsEnabled="True" |
|
|
|
Text="{Binding ConnectedModel.VersionName, FallbackValue=''}" |
|
|
|
Text="{Binding ConnectedModel.VersionName, FallbackValue=''}" |
|
|
|
TextWrapping="WrapWithOverflow" |
|
|
|
TextWrapping="WrapWithOverflow" |
|
|
|
Visibility="{Binding IsConnectedModel, Converter={StaticResource BoolToVisibilityConverter}}" /> |
|
|
|
Visibility="{Binding IsConnectedModel, Converter={StaticResource BoolToVisibilityConverter}}" /> |
|
|
|
<TextBlock |
|
|
|
|
|
|
|
FontSize="11" |
|
|
|
|
|
|
|
Foreground="{DynamicResource TextFillColorTertiaryBrush}" |
|
|
|
|
|
|
|
Margin="0,4,0,4" |
|
|
|
|
|
|
|
Text="{Binding FileName}" |
|
|
|
|
|
|
|
TextWrapping="WrapWithOverflow" |
|
|
|
|
|
|
|
VerticalAlignment="Bottom" /> |
|
|
|
|
|
|
|
</StackPanel> |
|
|
|
</StackPanel> |
|
|
|
<Grid Grid.Column="1" Visibility="{Binding IsConnectedModel, Mode=OneWay, Converter={StaticResource BoolToHiddenVisibleConverter}}"> |
|
|
|
<Grid Grid.Column="4" Grid.Row="0"> |
|
|
|
<Button |
|
|
|
<Button |
|
|
|
Background="Transparent" |
|
|
|
Background="Transparent" |
|
|
|
BorderBrush="Transparent" |
|
|
|
BorderBrush="Transparent" |
|
|
@ -108,6 +175,24 @@ |
|
|
|
Symbol="CloudCheckmark24" |
|
|
|
Symbol="CloudCheckmark24" |
|
|
|
ToolTip="Connected Model" /> |
|
|
|
ToolTip="Connected Model" /> |
|
|
|
</Button> |
|
|
|
</Button> |
|
|
|
|
|
|
|
<Button |
|
|
|
|
|
|
|
Background="Transparent" |
|
|
|
|
|
|
|
BorderBrush="Transparent" |
|
|
|
|
|
|
|
FontSize="20" |
|
|
|
|
|
|
|
HorizontalAlignment="Right" |
|
|
|
|
|
|
|
IsEnabled="True" |
|
|
|
|
|
|
|
MaxHeight="48" |
|
|
|
|
|
|
|
MaxWidth="64" |
|
|
|
|
|
|
|
Padding="0" |
|
|
|
|
|
|
|
ToolTip="Local Model" |
|
|
|
|
|
|
|
VerticalAlignment="Top" |
|
|
|
|
|
|
|
Visibility="{Binding IsConnectedModel, Mode=OneWay, Converter={StaticResource InvertBoolToVisibilityConverter}}"> |
|
|
|
|
|
|
|
<ui:SymbolIcon |
|
|
|
|
|
|
|
FontSize="12" |
|
|
|
|
|
|
|
Foreground="DimGray" |
|
|
|
|
|
|
|
Symbol="CloudOff24" |
|
|
|
|
|
|
|
ToolTip="Local Model" /> |
|
|
|
|
|
|
|
</Button> |
|
|
|
<ui:Button |
|
|
|
<ui:Button |
|
|
|
Background="Transparent" |
|
|
|
Background="Transparent" |
|
|
|
BorderBrush="Transparent" |
|
|
|
BorderBrush="Transparent" |
|
|
@ -127,43 +212,37 @@ |
|
|
|
ToolTip="Update Available" /> |
|
|
|
ToolTip="Update Available" /> |
|
|
|
</ui:Button.Icon> |
|
|
|
</ui:Button.Icon> |
|
|
|
</ui:Button> |
|
|
|
</ui:Button> |
|
|
|
<VirtualizingStackPanel |
|
|
|
|
|
|
|
HorizontalAlignment="Right" |
|
|
|
|
|
|
|
Orientation="Horizontal" |
|
|
|
|
|
|
|
VerticalAlignment="Bottom" |
|
|
|
|
|
|
|
Visibility="{Binding IsConnectedModel, Mode=OneWay, Converter={StaticResource BoolToHiddenVisibleConverter}}"> |
|
|
|
|
|
|
|
<ui:Card |
|
|
|
|
|
|
|
Height="18" |
|
|
|
|
|
|
|
Margin="4,0,0,0" |
|
|
|
|
|
|
|
Padding="3" |
|
|
|
|
|
|
|
Visibility="{Binding FpType, Converter={StaticResource StringNullOrEmptyToVisibilityConverter}, FallbackValue=Collapsed}" |
|
|
|
|
|
|
|
Width="40"> |
|
|
|
|
|
|
|
<TextBlock |
|
|
|
|
|
|
|
FontSize="10" |
|
|
|
|
|
|
|
FontWeight="Medium" |
|
|
|
|
|
|
|
Foreground="{DynamicResource TextFillColorSecondaryBrush}" |
|
|
|
|
|
|
|
HorizontalAlignment="Center" |
|
|
|
|
|
|
|
Text="{Binding FpType}" |
|
|
|
|
|
|
|
VerticalAlignment="Center" /> |
|
|
|
|
|
|
|
</ui:Card> |
|
|
|
|
|
|
|
<ui:Card |
|
|
|
|
|
|
|
Height="18" |
|
|
|
|
|
|
|
Margin="4,0,0,0" |
|
|
|
|
|
|
|
Padding="3" |
|
|
|
|
|
|
|
Visibility="{Binding BaseModel, Converter={StaticResource StringNullOrEmptyToVisibilityConverter}, FallbackValue=Collapsed}" |
|
|
|
|
|
|
|
Width="40"> |
|
|
|
|
|
|
|
<TextBlock |
|
|
|
|
|
|
|
FontSize="10" |
|
|
|
|
|
|
|
FontWeight="Medium" |
|
|
|
|
|
|
|
Foreground="{DynamicResource TextFillColorSecondaryBrush}" |
|
|
|
|
|
|
|
HorizontalAlignment="Center" |
|
|
|
|
|
|
|
Text="{Binding BaseModel}" |
|
|
|
|
|
|
|
VerticalAlignment="Center" /> |
|
|
|
|
|
|
|
</ui:Card> |
|
|
|
|
|
|
|
</VirtualizingStackPanel> |
|
|
|
|
|
|
|
</Grid> |
|
|
|
</Grid> |
|
|
|
|
|
|
|
<TextBlock |
|
|
|
|
|
|
|
FontSize="11" |
|
|
|
|
|
|
|
Foreground="{DynamicResource TextFillColorTertiaryBrush}" |
|
|
|
|
|
|
|
Grid.Column="0" |
|
|
|
|
|
|
|
Grid.ColumnSpan="3" |
|
|
|
|
|
|
|
Grid.Row="1" |
|
|
|
|
|
|
|
IsEnabled="True" |
|
|
|
|
|
|
|
Margin="4,4" |
|
|
|
|
|
|
|
Text="{Binding FileName}" |
|
|
|
|
|
|
|
TextTrimming="CharacterEllipsis" |
|
|
|
|
|
|
|
ToolTip="{Binding FileName}" |
|
|
|
|
|
|
|
VerticalAlignment="Bottom" /> |
|
|
|
|
|
|
|
<ItemsControl |
|
|
|
|
|
|
|
Grid.Column="3" |
|
|
|
|
|
|
|
Grid.ColumnSpan="2" |
|
|
|
|
|
|
|
Grid.Row="1" |
|
|
|
|
|
|
|
ItemTemplate="{StaticResource BadgeTemplate}" |
|
|
|
|
|
|
|
ItemsSource="{Binding Badges}" |
|
|
|
|
|
|
|
VerticalAlignment="Bottom"> |
|
|
|
|
|
|
|
<ItemsControl.ItemsPanel> |
|
|
|
|
|
|
|
<ItemsPanelTemplate> |
|
|
|
|
|
|
|
<StackPanel |
|
|
|
|
|
|
|
HorizontalAlignment="Right" |
|
|
|
|
|
|
|
Orientation="Horizontal" |
|
|
|
|
|
|
|
VerticalAlignment="Bottom" /> |
|
|
|
|
|
|
|
</ItemsPanelTemplate> |
|
|
|
|
|
|
|
</ItemsControl.ItemsPanel> |
|
|
|
|
|
|
|
</ItemsControl> |
|
|
|
</Grid> |
|
|
|
</Grid> |
|
|
|
</VirtualizingStackPanel> |
|
|
|
</StackPanel> |
|
|
|
|
|
|
|
|
|
|
|
<!-- Progress ring --> |
|
|
|
<!-- Progress ring --> |
|
|
|
<ui:ProgressRing |
|
|
|
<ui:ProgressRing |
|
|
@ -186,7 +265,9 @@ |
|
|
|
AllowDrop="True" |
|
|
|
AllowDrop="True" |
|
|
|
Header="{Binding Title}" |
|
|
|
Header="{Binding Title}" |
|
|
|
IsExpanded="True" |
|
|
|
IsExpanded="True" |
|
|
|
Margin="8"> |
|
|
|
Margin="8" |
|
|
|
|
|
|
|
Padding="8,8,8,16" |
|
|
|
|
|
|
|
Visibility="{Binding IsCategoryEnabled, Converter={StaticResource BoolToVisibilityConverter}, FallbackValue=Visible}"> |
|
|
|
<i:Interaction.Triggers> |
|
|
|
<i:Interaction.Triggers> |
|
|
|
<i:EventTrigger EventName="PreviewDragEnter"> |
|
|
|
<i:EventTrigger EventName="PreviewDragEnter"> |
|
|
|
<i:InvokeCommandAction Command="{Binding OnPreviewDragEnterCommand}" /> |
|
|
|
<i:InvokeCommandAction Command="{Binding OnPreviewDragEnterCommand}" /> |
|
|
@ -264,9 +345,9 @@ |
|
|
|
IsIndeterminate="{Binding Progress.IsIndeterminate, FallbackValue=False}" |
|
|
|
IsIndeterminate="{Binding Progress.IsIndeterminate, FallbackValue=False}" |
|
|
|
Margin="64,8" |
|
|
|
Margin="64,8" |
|
|
|
Name="ImportProgressBar" |
|
|
|
Name="ImportProgressBar" |
|
|
|
Value="{Binding Progress.Value, FallbackValue=20}" |
|
|
|
|
|
|
|
VerticalAlignment="Center" |
|
|
|
VerticalAlignment="Center" |
|
|
|
Visibility="{Binding Progress.ProgressVisibility, FallbackValue=Visible}" /> |
|
|
|
Visibility="{Binding Progress.ProgressVisibility, FallbackValue=Visible}" |
|
|
|
|
|
|
|
controls:ProgressBarSmoother.SmoothValue="{Binding Progress.Value, FallbackValue=20}" /> |
|
|
|
</VirtualizingStackPanel> |
|
|
|
</VirtualizingStackPanel> |
|
|
|
</Grid> |
|
|
|
</Grid> |
|
|
|
</Expander> |
|
|
|
</Expander> |
|
|
@ -281,17 +362,91 @@ |
|
|
|
</ContentControl.Style> |
|
|
|
</ContentControl.Style> |
|
|
|
</ContentControl> |
|
|
|
</ContentControl> |
|
|
|
</DataTemplate> |
|
|
|
</DataTemplate> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- Template for dropdown category checkbox item --> |
|
|
|
|
|
|
|
<DataTemplate DataType="{x:Type models:CheckpointFolder}" x:Key="CategoryItemTemplate"> |
|
|
|
|
|
|
|
<CheckBox Content="{Binding Title}" IsChecked="{Binding IsCategoryEnabled, Mode=TwoWay}" /> |
|
|
|
|
|
|
|
</DataTemplate> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- Template for dropdown box --> |
|
|
|
|
|
|
|
<ControlTemplate TargetType="{x:Type ComboBoxItem}" x:Key="CategoryDropDownStyle"> |
|
|
|
|
|
|
|
<Grid> |
|
|
|
|
|
|
|
<Border |
|
|
|
|
|
|
|
CornerRadius="{TemplateBinding Border.CornerRadius}" |
|
|
|
|
|
|
|
Margin="{TemplateBinding Margin}" |
|
|
|
|
|
|
|
Name="ContentBorder" |
|
|
|
|
|
|
|
Padding="0" |
|
|
|
|
|
|
|
SnapsToDevicePixels="True" |
|
|
|
|
|
|
|
VerticalAlignment="Stretch"> |
|
|
|
|
|
|
|
<Grid> |
|
|
|
|
|
|
|
<Rectangle |
|
|
|
|
|
|
|
Height="16" |
|
|
|
|
|
|
|
HorizontalAlignment="Left" |
|
|
|
|
|
|
|
Margin="0" |
|
|
|
|
|
|
|
RadiusX="2" |
|
|
|
|
|
|
|
RadiusY="2" |
|
|
|
|
|
|
|
VerticalAlignment="Center" |
|
|
|
|
|
|
|
Visibility="Collapsed" |
|
|
|
|
|
|
|
Width="3" |
|
|
|
|
|
|
|
x:Name="ActiveRectangle"> |
|
|
|
|
|
|
|
<Rectangle.Fill> |
|
|
|
|
|
|
|
<SolidColorBrush Color="{DynamicResource SystemAccentColorSecondary}" /> |
|
|
|
|
|
|
|
</Rectangle.Fill> |
|
|
|
|
|
|
|
</Rectangle> |
|
|
|
|
|
|
|
<Grid> |
|
|
|
|
|
|
|
<Grid.ColumnDefinitions> |
|
|
|
|
|
|
|
<ColumnDefinition Width="*" /> |
|
|
|
|
|
|
|
<ColumnDefinition Width="Auto" /> |
|
|
|
|
|
|
|
</Grid.ColumnDefinitions> |
|
|
|
|
|
|
|
<!-- Setup grid rows --> |
|
|
|
|
|
|
|
<StackPanel |
|
|
|
|
|
|
|
Grid.Column="0" |
|
|
|
|
|
|
|
Margin="10,0,0,0" |
|
|
|
|
|
|
|
VerticalAlignment="Top" |
|
|
|
|
|
|
|
d:DataContext="{d:DesignInstance Type=models:CheckpointFolder, |
|
|
|
|
|
|
|
IsDesignTimeCreatable=True}"> |
|
|
|
|
|
|
|
<CheckBox Content="{Binding TitleWithFilesCount}" IsChecked="{Binding IsCategoryEnabled, Mode=TwoWay}" /> |
|
|
|
|
|
|
|
</StackPanel> |
|
|
|
|
|
|
|
</Grid> |
|
|
|
|
|
|
|
</Grid> |
|
|
|
|
|
|
|
</Border> |
|
|
|
|
|
|
|
</Grid> |
|
|
|
|
|
|
|
</ControlTemplate> |
|
|
|
|
|
|
|
|
|
|
|
</Page.Resources> |
|
|
|
</Page.Resources> |
|
|
|
|
|
|
|
|
|
|
|
<!-- Folder Cards --> |
|
|
|
|
|
|
|
<Grid> |
|
|
|
<Grid> |
|
|
|
<Grid.RowDefinitions> |
|
|
|
<Grid.RowDefinitions> |
|
|
|
<RowDefinition Height="0.1*" /> |
|
|
|
<RowDefinition Height="0.1*" /> |
|
|
|
<RowDefinition Height="*" /> |
|
|
|
<RowDefinition Height="*" /> |
|
|
|
</Grid.RowDefinitions> |
|
|
|
</Grid.RowDefinitions> |
|
|
|
<VirtualizingStackPanel Margin="16,8" Orientation="Horizontal"> |
|
|
|
<!-- Top settings bar --> |
|
|
|
<ui:ToggleSwitch Content="Preview Images" /> |
|
|
|
<StackPanel |
|
|
|
</VirtualizingStackPanel> |
|
|
|
HorizontalAlignment="Right" |
|
|
|
|
|
|
|
Margin="16,0" |
|
|
|
|
|
|
|
Orientation="Horizontal"> |
|
|
|
|
|
|
|
<ComboBox |
|
|
|
|
|
|
|
HorizontalAlignment="Right" |
|
|
|
|
|
|
|
ItemsSource="{Binding CheckpointFolders}" |
|
|
|
|
|
|
|
MinWidth="180" |
|
|
|
|
|
|
|
SelectedIndex="0"> |
|
|
|
|
|
|
|
<ComboBox.ItemContainerStyle> |
|
|
|
|
|
|
|
<Style TargetType="ComboBoxItem"> |
|
|
|
|
|
|
|
<Setter Property="Template" Value="{StaticResource CategoryDropDownStyle}" /> |
|
|
|
|
|
|
|
</Style> |
|
|
|
|
|
|
|
</ComboBox.ItemContainerStyle> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<ComboBox.ItemTemplate> |
|
|
|
|
|
|
|
<DataTemplate DataType="{x:Type models:CheckpointFolder}"> |
|
|
|
|
|
|
|
<StackPanel Margin="10,0,0,0" VerticalAlignment="Top"> |
|
|
|
|
|
|
|
<TextBlock Margin="0,5,0,5" Text="Categories" /> |
|
|
|
|
|
|
|
</StackPanel> |
|
|
|
|
|
|
|
</DataTemplate> |
|
|
|
|
|
|
|
</ComboBox.ItemTemplate> |
|
|
|
|
|
|
|
</ComboBox> |
|
|
|
|
|
|
|
</StackPanel> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- Main view with model cards --> |
|
|
|
<ui:DynamicScrollViewer |
|
|
|
<ui:DynamicScrollViewer |
|
|
|
CanContentScroll="True" |
|
|
|
CanContentScroll="True" |
|
|
|
Grid.Row="1" |
|
|
|
Grid.Row="1" |
|
|
@ -303,7 +458,7 @@ |
|
|
|
HorizontalAlignment="Stretch" |
|
|
|
HorizontalAlignment="Stretch" |
|
|
|
ItemTemplate="{StaticResource CheckpointFolderGridDataTemplate}" |
|
|
|
ItemTemplate="{StaticResource CheckpointFolderGridDataTemplate}" |
|
|
|
ItemsSource="{Binding CheckpointFolders, Mode=OneWay}" |
|
|
|
ItemsSource="{Binding CheckpointFolders, Mode=OneWay}" |
|
|
|
Margin="8" /> |
|
|
|
Margin="8,0,8,8" /> |
|
|
|
</StackPanel> |
|
|
|
</StackPanel> |
|
|
|
</Grid> |
|
|
|
</Grid> |
|
|
|
</ui:DynamicScrollViewer> |
|
|
|
</ui:DynamicScrollViewer> |
|
|
|