|
|
@@ -9,155 +9,191 @@
|
|
|
xmlns:customControls="clr-namespace:PicView.Avalonia.CustomControls"
|
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
|
+ xmlns:uc="clr-namespace:PicView.Avalonia.Views.UC"
|
|
|
xmlns:viewModels="clr-namespace:PicView.Avalonia.ViewModels"
|
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
|
|
<Design.DataContext>
|
|
|
<viewModels:MainViewModel />
|
|
|
</Design.DataContext>
|
|
|
|
|
|
- <StackPanel
|
|
|
- Focusable="True"
|
|
|
- HorizontalAlignment="Center"
|
|
|
- Orientation="Vertical">
|
|
|
-
|
|
|
- <TextBlock
|
|
|
- Classes="txt"
|
|
|
- FontFamily="/Assets/Fonts/Roboto-Bold.ttf#Roboto"
|
|
|
- FontSize="14"
|
|
|
- Margin="0,20,0,0"
|
|
|
- Text="File associations" />
|
|
|
-
|
|
|
- <TextBlock
|
|
|
- Classes="txt"
|
|
|
- Foreground="{StaticResource SecondaryTextColor}"
|
|
|
- HorizontalAlignment="Left"
|
|
|
- Padding="0,5,10,15"
|
|
|
- Text="Select file types to associate. Unselected types will be unregistered." />
|
|
|
+ <Panel>
|
|
|
+
|
|
|
+ <uc:SpinWaiter IsVisible="{CompiledBinding AssociationsViewModel.IsProcessing, Mode=OneWay}" />
|
|
|
|
|
|
<StackPanel
|
|
|
- Background="Transparent"
|
|
|
- HorizontalAlignment="Right"
|
|
|
- Margin="0,0,0,5"
|
|
|
- Orientation="Horizontal">
|
|
|
+ Focusable="True"
|
|
|
+ HorizontalAlignment="Center"
|
|
|
+ IsHitTestVisible="{CompiledBinding !AssociationsViewModel.IsProcessing,
|
|
|
+ Mode=OneWay}"
|
|
|
+ Opacity="{CompiledBinding AssociationsViewModel.Opacity,
|
|
|
+ Mode=OneWay}"
|
|
|
+ Orientation="Vertical">
|
|
|
+
|
|
|
+ <TextBlock
|
|
|
+ Classes="txt"
|
|
|
+ FontFamily="/Assets/Fonts/Roboto-Bold.ttf#Roboto"
|
|
|
+ FontSize="14"
|
|
|
+ Margin="0,20,0,0"
|
|
|
+ Text="File associations" />
|
|
|
+
|
|
|
+ <TextBlock
|
|
|
+ Classes="txt"
|
|
|
+ Foreground="{StaticResource SecondaryTextColor}"
|
|
|
+ HorizontalAlignment="Left"
|
|
|
+ Padding="0,5,10,15"
|
|
|
+ Text="Select file types to associate. Unselected types will be unregistered." />
|
|
|
+
|
|
|
+ <StackPanel
|
|
|
+ Background="Transparent"
|
|
|
+ HorizontalAlignment="Right"
|
|
|
+ Margin="0,0,0,5"
|
|
|
+ Orientation="Horizontal">
|
|
|
|
|
|
- <Panel>
|
|
|
+ <Panel>
|
|
|
|
|
|
- <Image
|
|
|
- Height="14"
|
|
|
- HorizontalAlignment="Left"
|
|
|
- Margin="5,0,0,0"
|
|
|
- Source="{StaticResource SearchImage}"
|
|
|
- Width="14" />
|
|
|
-
|
|
|
- <AutoCompleteBox
|
|
|
- Background="Transparent"
|
|
|
- BorderBrush="Transparent"
|
|
|
- FontFamily="/Assets/Fonts/Roboto-Regular.ttf#Roboto"
|
|
|
- Foreground="{DynamicResource MainTextColor}"
|
|
|
- HorizontalAlignment="Left"
|
|
|
- Padding="23,7,4,6"
|
|
|
- Text="{CompiledBinding AssociationsViewModel.FilterText,
|
|
|
- FallbackValue='',
|
|
|
- Mode=TwoWay}"
|
|
|
- Watermark="Filter..."
|
|
|
- Width="269"
|
|
|
- x:Name="FilterBox" />
|
|
|
-
|
|
|
- <customControls:IconButton
|
|
|
+ <Image
|
|
|
+ Height="14"
|
|
|
+ HorizontalAlignment="Left"
|
|
|
+ Margin="5,0,0,0"
|
|
|
+ Source="{StaticResource SearchImage}"
|
|
|
+ Width="14" />
|
|
|
+
|
|
|
+ <AutoCompleteBox
|
|
|
+ Background="Transparent"
|
|
|
+ BorderBrush="Transparent"
|
|
|
+ FontFamily="/Assets/Fonts/Roboto-Regular.ttf#Roboto"
|
|
|
+ Foreground="{DynamicResource MainTextColor}"
|
|
|
+ HorizontalAlignment="Left"
|
|
|
+ Padding="23,7,4,6"
|
|
|
+ Text="{CompiledBinding AssociationsViewModel.FilterText,
|
|
|
+ FallbackValue='',
|
|
|
+ Mode=TwoWay}"
|
|
|
+ Watermark="Filter..."
|
|
|
+ Width="269"
|
|
|
+ x:Name="FilterBox" />
|
|
|
+
|
|
|
+ <customControls:IconButton
|
|
|
+ Classes="altHover"
|
|
|
+ Command="{CompiledBinding AssociationsViewModel.ClearFilterCommand}"
|
|
|
+ Data="{StaticResource CloseGeometry}"
|
|
|
+ DockPanel.Dock="Right"
|
|
|
+ Foreground="{DynamicResource MainTextColorFaded}"
|
|
|
+ HorizontalAlignment="Right"
|
|
|
+ IconHeight="12"
|
|
|
+ IconWidth="12"
|
|
|
+ IsVisible="{CompiledBinding AssociationsViewModel.FilterText,
|
|
|
+ Converter={x:Static StringConverters.IsNotNullOrEmpty}}"
|
|
|
+ Padding="10,3,10,3"
|
|
|
+ x:Name="ClearButton" />
|
|
|
+ </Panel>
|
|
|
+
|
|
|
+ <Button
|
|
|
Classes="altHover"
|
|
|
- Command="{CompiledBinding AssociationsViewModel.ClearFilterCommand}"
|
|
|
- Data="{StaticResource CloseGeometry}"
|
|
|
- DockPanel.Dock="Right"
|
|
|
- Foreground="{DynamicResource MainTextColorFaded}"
|
|
|
- HorizontalAlignment="Right"
|
|
|
- IconHeight="12"
|
|
|
- IconWidth="12"
|
|
|
- IsVisible="{CompiledBinding AssociationsViewModel.FilterText,
|
|
|
- Converter={x:Static StringConverters.IsNotNullOrEmpty}}"
|
|
|
- Padding="10,3,10,3"
|
|
|
- x:Name="ClearButton" />
|
|
|
- </Panel>
|
|
|
-
|
|
|
- <Button
|
|
|
- Classes="altHover"
|
|
|
- Padding="10,2,10,2"
|
|
|
- x:Name="SelectAllButton">
|
|
|
- <TextBlock
|
|
|
- Classes="txt"
|
|
|
- Foreground="{StaticResource SecondaryTextColor}"
|
|
|
- Text="{CompiledBinding Translation.SelectAll,
|
|
|
- Mode=OneWay}" />
|
|
|
- </Button>
|
|
|
-
|
|
|
- <Rectangle
|
|
|
- Fill="{DynamicResource TertiaryBorderColor}"
|
|
|
- Height="16"
|
|
|
- Margin="5,0,5,0"
|
|
|
- Width="2" />
|
|
|
-
|
|
|
- <Button
|
|
|
- Classes="altHover"
|
|
|
- Padding="10,2,10,2"
|
|
|
- x:Name="UnSelectAllButton">
|
|
|
- <TextBlock
|
|
|
- Classes="txt"
|
|
|
- Foreground="{StaticResource SecondaryTextColor}"
|
|
|
- Text="Unselect All" />
|
|
|
- </Button>
|
|
|
- </StackPanel>
|
|
|
-
|
|
|
+ Padding="10,2,10,2"
|
|
|
+ x:Name="SelectAllButton">
|
|
|
+ <TextBlock
|
|
|
+ Classes="txt"
|
|
|
+ Foreground="{StaticResource SecondaryTextColor}"
|
|
|
+ Text="{CompiledBinding Translation.SelectAll,
|
|
|
+ Mode=OneWay}" />
|
|
|
+ </Button>
|
|
|
|
|
|
- <customControls:AutoScrollViewer
|
|
|
- Background="Transparent"
|
|
|
- Height="520"
|
|
|
- x:Name="FileTypesScrollViewer">
|
|
|
- <StackPanel x:Name="FileTypesContainer">
|
|
|
- <StackPanel.Styles>
|
|
|
- <Style Selector="CheckBox.x">
|
|
|
- <Setter Property="Margin" Value="15,0,0,5" />
|
|
|
- </Style>
|
|
|
- <Style Selector="CheckBox.y">
|
|
|
- <Setter Property="Margin" Value="0,10,0,10" />
|
|
|
- </Style>
|
|
|
- </StackPanel.Styles>
|
|
|
+ <Rectangle
|
|
|
+ Fill="{DynamicResource TertiaryBorderColor}"
|
|
|
+ Height="16"
|
|
|
+ Margin="5,0,5,0"
|
|
|
+ Width="2" />
|
|
|
|
|
|
+ <Button
|
|
|
+ Classes="altHover"
|
|
|
+ Padding="10,2,10,2"
|
|
|
+ x:Name="UnSelectAllButton">
|
|
|
+ <TextBlock
|
|
|
+ Classes="txt"
|
|
|
+ Foreground="{StaticResource SecondaryTextColor}"
|
|
|
+ Text="Unselect All" />
|
|
|
+ </Button>
|
|
|
</StackPanel>
|
|
|
- </customControls:AutoScrollViewer>
|
|
|
|
|
|
- <DockPanel Margin="0,15,0,0">
|
|
|
|
|
|
- <Button
|
|
|
- Background="{DynamicResource AccentColor}"
|
|
|
- Classes="BorderStyle accentHover mainBtn"
|
|
|
- Command="{CompiledBinding AssociationsViewModel.ApplyCommand}"
|
|
|
- DockPanel.Dock="Right"
|
|
|
- HorizontalAlignment="Right">
|
|
|
- <StackPanel Orientation="Horizontal">
|
|
|
- <Image
|
|
|
- Height="18"
|
|
|
- Margin="0,0,10,0"
|
|
|
- Source="{StaticResource UserShieldImage}"
|
|
|
- Width="18" />
|
|
|
+ <customControls:AutoScrollViewer
|
|
|
+ Background="Transparent"
|
|
|
+ Height="520"
|
|
|
+ x:Name="FileTypesScrollViewer">
|
|
|
+ <StackPanel x:Name="FileTypesContainer">
|
|
|
+ <StackPanel.Styles>
|
|
|
+ <Style Selector="CheckBox.x">
|
|
|
+ <Setter Property="Margin" Value="15,0,0,5" />
|
|
|
+ </Style>
|
|
|
+ <Style Selector="CheckBox.y">
|
|
|
+ <Setter Property="Margin" Value="0,10,0,10" />
|
|
|
+ </Style>
|
|
|
+ </StackPanel.Styles>
|
|
|
+
|
|
|
+ </StackPanel>
|
|
|
+ </customControls:AutoScrollViewer>
|
|
|
+
|
|
|
+ <DockPanel Margin="0,15,0,0">
|
|
|
+
|
|
|
+ <Button
|
|
|
+ Classes="altHover"
|
|
|
+ DockPanel.Dock="Left"
|
|
|
+ HorizontalAlignment="Left"
|
|
|
+ Padding="20,10"
|
|
|
+ x:Name="ResetButton">
|
|
|
<TextBlock
|
|
|
Classes="txt"
|
|
|
- Margin="0,0,10,0"
|
|
|
- Text="{CompiledBinding Translation.Apply,
|
|
|
+ Foreground="{StaticResource SecondaryTextColor}"
|
|
|
+ Text="{CompiledBinding Translation.Reset,
|
|
|
Mode=OneWay}" />
|
|
|
- </StackPanel>
|
|
|
- </Button>
|
|
|
+ </Button>
|
|
|
|
|
|
- <Button
|
|
|
- Classes="altHover y"
|
|
|
- DockPanel.Dock="Right"
|
|
|
- HorizontalAlignment="Right"
|
|
|
- Padding="5,0">
|
|
|
- <TextBlock
|
|
|
- Classes="txt"
|
|
|
- Foreground="{StaticResource SecondaryTextColor}"
|
|
|
- Text="{CompiledBinding Translation.ResetButtonText,
|
|
|
- Mode=OneWay}" />
|
|
|
- </Button>
|
|
|
-
|
|
|
- </DockPanel>
|
|
|
- </StackPanel>
|
|
|
+ <Button
|
|
|
+ Background="{DynamicResource AccentColor}"
|
|
|
+ Classes="BorderStyle accentHover mainBtn"
|
|
|
+ Command="{CompiledBinding AssociationsViewModel.ApplyCommand}"
|
|
|
+ DockPanel.Dock="Right"
|
|
|
+ HorizontalAlignment="Right"
|
|
|
+ Padding="20,10">
|
|
|
+ <StackPanel Orientation="Horizontal">
|
|
|
+ <TextBlock
|
|
|
+ Classes="txt"
|
|
|
+ Margin="10,0,0,0"
|
|
|
+ Text="{CompiledBinding Translation.Apply,
|
|
|
+ Mode=OneWay}" />
|
|
|
+ <Image
|
|
|
+ Height="18"
|
|
|
+ Margin="10,0,0,0"
|
|
|
+ Source="{StaticResource UserShieldImage}"
|
|
|
+ Width="18" />
|
|
|
+ </StackPanel>
|
|
|
+ </Button>
|
|
|
+
|
|
|
+ <Button
|
|
|
+ Classes="errorHover"
|
|
|
+ Command="{CompiledBinding AssociationsViewModel.UnassociateCommand}"
|
|
|
+ DockPanel.Dock="Right"
|
|
|
+ HorizontalAlignment="Right"
|
|
|
+ Padding="5,0"
|
|
|
+ x:Name="UnassociateButton">
|
|
|
+ <StackPanel Orientation="Horizontal">
|
|
|
+ <TextBlock
|
|
|
+ Classes="txt"
|
|
|
+ Margin="10,0,0,0"
|
|
|
+ Text="Unassociate" />
|
|
|
+ <Image
|
|
|
+ Height="18"
|
|
|
+ Margin="10,0,10,0"
|
|
|
+ Source="{StaticResource UserShieldImage}"
|
|
|
+ Width="18" />
|
|
|
+ </StackPanel>
|
|
|
+ </Button>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ </DockPanel>
|
|
|
+ </StackPanel>
|
|
|
+ </Panel>
|
|
|
</UserControl>
|