|
@@ -1,283 +1,349 @@
|
|
<UserControl
|
|
<UserControl
|
|
|
|
+ Height="700"
|
|
|
|
+ Width="850"
|
|
|
|
+ mc:Ignorable="d"
|
|
x:Class="PicView.Avalonia.Views.Main.PrintPreviewView"
|
|
x:Class="PicView.Avalonia.Views.Main.PrintPreviewView"
|
|
|
|
+ x:DataType="viewModels:MainViewModel"
|
|
xmlns="https://github.com/avaloniaui"
|
|
xmlns="https://github.com/avaloniaui"
|
|
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
|
|
|
|
+ xmlns:customControls="clr-namespace:PicView.Avalonia.CustomControls"
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
xmlns:uc="clr-namespace:PicView.Avalonia.Views.UC"
|
|
xmlns:uc="clr-namespace:PicView.Avalonia.Views.UC"
|
|
- xmlns:customControls="clr-namespace:PicView.Avalonia.CustomControls"
|
|
|
|
xmlns:viewModels="clr-namespace:PicView.Avalonia.ViewModels"
|
|
xmlns:viewModels="clr-namespace:PicView.Avalonia.ViewModels"
|
|
- mc:Ignorable="d"
|
|
|
|
- x:DataType="viewModels:MainViewModel"
|
|
|
|
- Width="850"
|
|
|
|
- Height="700">
|
|
|
|
-
|
|
|
|
- <Panel>
|
|
|
|
- <!-- Spinner overlay -->
|
|
|
|
- <uc:SpinWaiter
|
|
|
|
- HorizontalAlignment="Center" VerticalAlignment="Center" ZIndex="100"
|
|
|
|
- IsVisible="{CompiledBinding PrintPreview.IsProcessing.Value, Mode=OneWay}" />
|
|
|
|
-
|
|
|
|
- <!-- Root grid with two columns -->
|
|
|
|
- <Grid RowDefinitions="*,Auto" ColumnDefinitions="2*,3*" Margin="10"
|
|
|
|
- Opacity="{CompiledBinding PrintPreview.Opacity.Value, Mode=OneWay}"
|
|
|
|
- IsHitTestVisible="{CompiledBinding !PrintPreview.IsProcessing.Value, Mode=OneWay}">
|
|
|
|
-
|
|
|
|
- <!-- Settings Panel (Left) -->
|
|
|
|
- <StackPanel Grid.Row="0" Grid.Column="0" Spacing="12">
|
|
|
|
-
|
|
|
|
- <!-- Printer -->
|
|
|
|
- <TextBlock
|
|
|
|
- Text="{CompiledBinding Translation.Printer.Value, Mode=OneWay}"
|
|
|
|
- Classes="txt"
|
|
|
|
- FontFamily="/Assets/Fonts/Roboto-Bold.ttf#Roboto"
|
|
|
|
- FontSize="14"
|
|
|
|
- Foreground="{StaticResource SecondaryTextColor}"
|
|
|
|
- Margin="0,6,0,0" />
|
|
|
|
-
|
|
|
|
- <ComboBox
|
|
|
|
|
|
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
|
|
|
+
|
|
|
|
+ <Panel>
|
|
|
|
+ <!-- Spinner overlay -->
|
|
|
|
+ <uc:SpinWaiter
|
|
|
|
+ HorizontalAlignment="Center"
|
|
|
|
+ IsVisible="{CompiledBinding PrintPreview.IsProcessing.Value,
|
|
|
|
+ Mode=OneWay}"
|
|
|
|
+ VerticalAlignment="Center"
|
|
|
|
+ ZIndex="100" />
|
|
|
|
+
|
|
|
|
+ <!-- Root grid with two columns -->
|
|
|
|
+ <Grid
|
|
|
|
+ ColumnDefinitions="2*,3*"
|
|
|
|
+ IsHitTestVisible="{CompiledBinding !PrintPreview.IsProcessing.Value,
|
|
|
|
+ Mode=OneWay}"
|
|
|
|
+ Margin="10"
|
|
|
|
+ Opacity="{CompiledBinding PrintPreview.Opacity.Value,
|
|
|
|
+ Mode=OneWay}"
|
|
|
|
+ RowDefinitions="*,Auto">
|
|
|
|
+
|
|
|
|
+ <!-- Settings Panel (Left) -->
|
|
|
|
+ <StackPanel
|
|
|
|
+ Grid.Column="0"
|
|
|
|
+ Grid.Row="0"
|
|
|
|
+ Spacing="12">
|
|
|
|
+
|
|
|
|
+ <!-- Printer -->
|
|
|
|
+ <TextBlock
|
|
|
|
+ Classes="txt"
|
|
|
|
+ FontFamily="/Assets/Fonts/Roboto-Bold.ttf#Roboto"
|
|
|
|
+ FontSize="14"
|
|
|
|
+ Margin="0,6,0,0"
|
|
|
|
+ Text="{CompiledBinding Translation.Printer.Value,
|
|
|
|
+ Mode=OneWay}" />
|
|
|
|
+
|
|
|
|
+ <ComboBox
|
|
Background="{DynamicResource SecondaryBackgroundColor}"
|
|
Background="{DynamicResource SecondaryBackgroundColor}"
|
|
BorderBrush="{DynamicResource MainBorderColor}"
|
|
BorderBrush="{DynamicResource MainBorderColor}"
|
|
BorderThickness="1"
|
|
BorderThickness="1"
|
|
FontFamily="/Assets/Fonts/Roboto-Medium.ttf#Roboto"
|
|
FontFamily="/Assets/Fonts/Roboto-Medium.ttf#Roboto"
|
|
Foreground="{DynamicResource MainTextColor}"
|
|
Foreground="{DynamicResource MainTextColor}"
|
|
|
|
+ ItemsSource="{CompiledBinding PrintPreview.Printers.Value}"
|
|
Margin="0,0,0,4"
|
|
Margin="0,0,0,4"
|
|
Padding="5,7,0,7"
|
|
Padding="5,7,0,7"
|
|
- ItemsSource="{CompiledBinding PrintPreview.Printers.Value}"
|
|
|
|
- SelectedItem="{CompiledBinding PrintPreview.PrintSettings.Value.PrinterName.Value, Mode=TwoWay}" />
|
|
|
|
-
|
|
|
|
- <!-- Paper Size -->
|
|
|
|
- <TextBlock
|
|
|
|
- Text="{CompiledBinding Translation.PaperSize.Value, Mode=OneWay}"
|
|
|
|
- Classes="txt"
|
|
|
|
- FontFamily="/Assets/Fonts/Roboto-Bold.ttf#Roboto"
|
|
|
|
- FontSize="14"
|
|
|
|
- Foreground="{StaticResource SecondaryTextColor}"
|
|
|
|
- Margin="0,6,0,0" />
|
|
|
|
-
|
|
|
|
- <ComboBox
|
|
|
|
- Background="{DynamicResource SecondaryBackgroundColor}"
|
|
|
|
|
|
+ SelectedItem="{CompiledBinding PrintPreview.PrintSettings.Value.PrinterName.Value,
|
|
|
|
+ Mode=TwoWay}" />
|
|
|
|
+
|
|
|
|
+ <!-- Paper Size -->
|
|
|
|
+ <TextBlock
|
|
|
|
+ Classes="txt"
|
|
|
|
+ FontFamily="/Assets/Fonts/Roboto-Bold.ttf#Roboto"
|
|
|
|
+ FontSize="14"
|
|
|
|
+ Margin="0,6,0,0"
|
|
|
|
+ Text="{CompiledBinding Translation.PaperSize.Value,
|
|
|
|
+ Mode=OneWay}" />
|
|
|
|
+
|
|
|
|
+ <ComboBox
|
|
|
|
+ Background="{DynamicResource SecondaryBackgroundColor}"
|
|
BorderBrush="{DynamicResource MainBorderColor}"
|
|
BorderBrush="{DynamicResource MainBorderColor}"
|
|
BorderThickness="1"
|
|
BorderThickness="1"
|
|
FontFamily="/Assets/Fonts/Roboto-Medium.ttf#Roboto"
|
|
FontFamily="/Assets/Fonts/Roboto-Medium.ttf#Roboto"
|
|
Foreground="{DynamicResource MainTextColor}"
|
|
Foreground="{DynamicResource MainTextColor}"
|
|
|
|
+ ItemsSource="{CompiledBinding PrintPreview.PaperSizes.Value}"
|
|
Margin="0,0,0,4"
|
|
Margin="0,0,0,4"
|
|
Padding="5,7,0,7"
|
|
Padding="5,7,0,7"
|
|
- ItemsSource="{CompiledBinding PrintPreview.PaperSizes.Value}"
|
|
|
|
- SelectedItem="{CompiledBinding PrintPreview.PrintSettings.Value.PaperSize.Value, Mode=TwoWay}" />
|
|
|
|
-
|
|
|
|
- <!-- Orientation -->
|
|
|
|
- <TextBlock
|
|
|
|
- Text="{CompiledBinding Translation.Orientation.Value, Mode=OneWay}"
|
|
|
|
- Classes="txt"
|
|
|
|
- FontFamily="/Assets/Fonts/Roboto-Bold.ttf#Roboto"
|
|
|
|
- FontSize="14"
|
|
|
|
- Foreground="{StaticResource SecondaryTextColor}"
|
|
|
|
- Margin="0,6,0,0" />
|
|
|
|
-
|
|
|
|
- <ComboBox
|
|
|
|
- Background="{DynamicResource SecondaryBackgroundColor}"
|
|
|
|
|
|
+ SelectedItem="{CompiledBinding PrintPreview.PrintSettings.Value.PaperSize.Value,
|
|
|
|
+ Mode=TwoWay}" />
|
|
|
|
+
|
|
|
|
+ <!-- Orientation -->
|
|
|
|
+ <TextBlock
|
|
|
|
+ Classes="txt"
|
|
|
|
+ FontFamily="/Assets/Fonts/Roboto-Bold.ttf#Roboto"
|
|
|
|
+ FontSize="14"
|
|
|
|
+ Margin="0,6,0,0"
|
|
|
|
+ Text="{CompiledBinding Translation.Orientation.Value,
|
|
|
|
+ Mode=OneWay}" />
|
|
|
|
+
|
|
|
|
+ <ComboBox
|
|
|
|
+ Background="{DynamicResource SecondaryBackgroundColor}"
|
|
BorderBrush="{DynamicResource MainBorderColor}"
|
|
BorderBrush="{DynamicResource MainBorderColor}"
|
|
BorderThickness="1"
|
|
BorderThickness="1"
|
|
FontFamily="/Assets/Fonts/Roboto-Medium.ttf#Roboto"
|
|
FontFamily="/Assets/Fonts/Roboto-Medium.ttf#Roboto"
|
|
Foreground="{DynamicResource MainTextColor}"
|
|
Foreground="{DynamicResource MainTextColor}"
|
|
|
|
+ ItemsSource="{CompiledBinding PrintPreview.Orientations.Value}"
|
|
Margin="0,0,0,4"
|
|
Margin="0,0,0,4"
|
|
Padding="5,7,0,7"
|
|
Padding="5,7,0,7"
|
|
- ItemsSource="{CompiledBinding PrintPreview.Orientations.Value}"
|
|
|
|
- SelectedIndex="{CompiledBinding PrintPreview.PrintSettings.Value.Orientation.Value, Mode=TwoWay}" />
|
|
|
|
-
|
|
|
|
- <!-- Scale Mode -->
|
|
|
|
- <TextBlock
|
|
|
|
- Text="{CompiledBinding Translation.Scale.Value, Mode=OneWay}"
|
|
|
|
- Classes="txt"
|
|
|
|
- FontFamily="/Assets/Fonts/Roboto-Bold.ttf#Roboto"
|
|
|
|
- FontSize="14"
|
|
|
|
- Foreground="{StaticResource SecondaryTextColor}"
|
|
|
|
- Margin="0,6,0,0" />
|
|
|
|
-
|
|
|
|
- <ComboBox
|
|
|
|
- Background="{DynamicResource SecondaryBackgroundColor}"
|
|
|
|
|
|
+ SelectedIndex="{CompiledBinding PrintPreview.PrintSettings.Value.Orientation.Value,
|
|
|
|
+ Mode=TwoWay}" />
|
|
|
|
+
|
|
|
|
+ <!-- Scale Mode -->
|
|
|
|
+ <TextBlock
|
|
|
|
+ Classes="txt"
|
|
|
|
+ FontFamily="/Assets/Fonts/Roboto-Bold.ttf#Roboto"
|
|
|
|
+ FontSize="14"
|
|
|
|
+ Margin="0,6,0,0"
|
|
|
|
+ Text="{CompiledBinding Translation.Scale.Value,
|
|
|
|
+ Mode=OneWay}" />
|
|
|
|
+
|
|
|
|
+ <ComboBox
|
|
|
|
+ Background="{DynamicResource SecondaryBackgroundColor}"
|
|
BorderBrush="{DynamicResource MainBorderColor}"
|
|
BorderBrush="{DynamicResource MainBorderColor}"
|
|
BorderThickness="1"
|
|
BorderThickness="1"
|
|
FontFamily="/Assets/Fonts/Roboto-Medium.ttf#Roboto"
|
|
FontFamily="/Assets/Fonts/Roboto-Medium.ttf#Roboto"
|
|
Foreground="{DynamicResource MainTextColor}"
|
|
Foreground="{DynamicResource MainTextColor}"
|
|
|
|
+ ItemsSource="{CompiledBinding PrintPreview.ScaleModes.Value}"
|
|
Margin="0,0,0,4"
|
|
Margin="0,0,0,4"
|
|
Padding="5,7,0,7"
|
|
Padding="5,7,0,7"
|
|
- ItemsSource="{CompiledBinding PrintPreview.ScaleModes.Value}"
|
|
|
|
- SelectedIndex="{CompiledBinding PrintPreview.PrintSettings.Value.ScaleMode.Value, Mode=TwoWay}" />
|
|
|
|
-
|
|
|
|
- <!-- Color Mode -->
|
|
|
|
- <TextBlock
|
|
|
|
- Text="{CompiledBinding Translation.Color.Value, Mode=OneWay}"
|
|
|
|
- Classes="txt"
|
|
|
|
- FontFamily="/Assets/Fonts/Roboto-Bold.ttf#Roboto"
|
|
|
|
- FontSize="14"
|
|
|
|
- Foreground="{StaticResource SecondaryTextColor}"
|
|
|
|
- Margin="0,6,0,0" />
|
|
|
|
-
|
|
|
|
- <ComboBox
|
|
|
|
- Background="{DynamicResource SecondaryBackgroundColor}"
|
|
|
|
|
|
+ SelectedIndex="{CompiledBinding PrintPreview.PrintSettings.Value.ScaleMode.Value,
|
|
|
|
+ Mode=TwoWay}" />
|
|
|
|
+
|
|
|
|
+ <!-- Color Mode -->
|
|
|
|
+ <TextBlock
|
|
|
|
+ Classes="txt"
|
|
|
|
+ FontFamily="/Assets/Fonts/Roboto-Bold.ttf#Roboto"
|
|
|
|
+ FontSize="14"
|
|
|
|
+ Margin="0,6,0,0"
|
|
|
|
+ Text="{CompiledBinding Translation.Color.Value,
|
|
|
|
+ Mode=OneWay}" />
|
|
|
|
+
|
|
|
|
+ <ComboBox
|
|
|
|
+ Background="{DynamicResource SecondaryBackgroundColor}"
|
|
BorderBrush="{DynamicResource MainBorderColor}"
|
|
BorderBrush="{DynamicResource MainBorderColor}"
|
|
BorderThickness="1"
|
|
BorderThickness="1"
|
|
FontFamily="/Assets/Fonts/Roboto-Medium.ttf#Roboto"
|
|
FontFamily="/Assets/Fonts/Roboto-Medium.ttf#Roboto"
|
|
Foreground="{DynamicResource MainTextColor}"
|
|
Foreground="{DynamicResource MainTextColor}"
|
|
|
|
+ ItemsSource="{CompiledBinding PrintPreview.ColorModes.Value}"
|
|
Margin="0,0,0,4"
|
|
Margin="0,0,0,4"
|
|
Padding="5,7,0,7"
|
|
Padding="5,7,0,7"
|
|
- ItemsSource="{CompiledBinding PrintPreview.ColorModes.Value}"
|
|
|
|
- SelectedIndex="{CompiledBinding PrintPreview.PrintSettings.Value.ColorMode.Value, Mode=TwoWay}"/>
|
|
|
|
-
|
|
|
|
- <!-- Copies -->
|
|
|
|
-
|
|
|
|
- <TextBlock
|
|
|
|
- Text="{CompiledBinding Translation.Copies.Value, Mode=OneWay}"
|
|
|
|
- Classes="txt"
|
|
|
|
- FontFamily="/Assets/Fonts/Roboto-Bold.ttf#Roboto"
|
|
|
|
- FontSize="14"
|
|
|
|
- Foreground="{StaticResource SecondaryTextColor}"
|
|
|
|
- Margin="0,6,0,0" />
|
|
|
|
-
|
|
|
|
- <NumericUpDown
|
|
|
|
- Background="{DynamicResource SecondaryBackgroundColor}"
|
|
|
|
|
|
+ SelectedIndex="{CompiledBinding PrintPreview.PrintSettings.Value.ColorMode.Value,
|
|
|
|
+ Mode=TwoWay}" />
|
|
|
|
+
|
|
|
|
+ <!-- Copies -->
|
|
|
|
+
|
|
|
|
+ <TextBlock
|
|
|
|
+ Classes="txt"
|
|
|
|
+ FontFamily="/Assets/Fonts/Roboto-Bold.ttf#Roboto"
|
|
|
|
+ FontSize="14"
|
|
|
|
+ Margin="0,6,0,0"
|
|
|
|
+ Text="{CompiledBinding Translation.Copies.Value,
|
|
|
|
+ Mode=OneWay}" />
|
|
|
|
+
|
|
|
|
+ <NumericUpDown
|
|
|
|
+ Background="{DynamicResource SecondaryBackgroundColor}"
|
|
BorderBrush="{DynamicResource MainBorderColor}"
|
|
BorderBrush="{DynamicResource MainBorderColor}"
|
|
BorderThickness="1"
|
|
BorderThickness="1"
|
|
FontFamily="/Assets/Fonts/Roboto-Medium.ttf#Roboto"
|
|
FontFamily="/Assets/Fonts/Roboto-Medium.ttf#Roboto"
|
|
Foreground="{DynamicResource MainTextColor}"
|
|
Foreground="{DynamicResource MainTextColor}"
|
|
|
|
+ Increment="1"
|
|
Margin="0,0,0,4"
|
|
Margin="0,0,0,4"
|
|
|
|
+ Maximum="200"
|
|
|
|
+ Minimum="1"
|
|
Padding="5,7,0,7"
|
|
Padding="5,7,0,7"
|
|
- Minimum="1"
|
|
|
|
- Maximum="200"
|
|
|
|
- Increment="1"
|
|
|
|
- Value="{CompiledBinding PrintPreview.PrintSettings.Value.Copies.Value, Mode=TwoWay}" />
|
|
|
|
-
|
|
|
|
- <!-- Margins -->
|
|
|
|
- <TextBlock
|
|
|
|
- Text="{CompiledBinding Translation.Margins.Value, Mode=OneWay}"
|
|
|
|
- Classes="txt"
|
|
|
|
- FontFamily="/Assets/Fonts/Roboto-Bold.ttf#Roboto"
|
|
|
|
- FontSize="14"
|
|
|
|
- Foreground="{StaticResource SecondaryTextColor}"
|
|
|
|
- Margin="0,6,0,0" />
|
|
|
|
-
|
|
|
|
- <Grid ColumnDefinitions="*,*,*,*"
|
|
|
|
- Margin="0,0,0,0"
|
|
|
|
- ColumnSpacing="6">
|
|
|
|
-
|
|
|
|
- <!-- Top -->
|
|
|
|
- <StackPanel Grid.Column="0">
|
|
|
|
- <TextBlock Text="{CompiledBinding Translation.Top.Value, Mode=OneWay}"
|
|
|
|
- Foreground="{StaticResource SecondaryTextColor}"
|
|
|
|
- FontSize="12"
|
|
|
|
- Margin="0,0,0,2" />
|
|
|
|
- <NumericUpDown Minimum="0" Maximum="100" Increment="1"
|
|
|
|
- Value="{CompiledBinding PrintPreview.PrintSettings.Value.MarginTop.Value, Mode=TwoWay}"
|
|
|
|
- HorizontalAlignment="Stretch"/>
|
|
|
|
- </StackPanel>
|
|
|
|
-
|
|
|
|
- <!-- Bottom -->
|
|
|
|
- <StackPanel Grid.Column="1">
|
|
|
|
- <TextBlock Text="{CompiledBinding Translation.Bottom.Value, Mode=OneWay}"
|
|
|
|
- Foreground="{StaticResource SecondaryTextColor}"
|
|
|
|
- FontSize="12"
|
|
|
|
- Margin="0,0,0,2" />
|
|
|
|
- <NumericUpDown Minimum="0" Maximum="100" Increment="1"
|
|
|
|
- Value="{CompiledBinding PrintPreview.PrintSettings.Value.MarginBottom.Value, Mode=TwoWay}"
|
|
|
|
- HorizontalAlignment="Stretch"/>
|
|
|
|
- </StackPanel>
|
|
|
|
-
|
|
|
|
- <!-- Left -->
|
|
|
|
- <StackPanel Grid.Column="2">
|
|
|
|
- <TextBlock Text="{CompiledBinding Translation.Left.Value, Mode=OneWay}"
|
|
|
|
- Foreground="{StaticResource SecondaryTextColor}"
|
|
|
|
- FontSize="12"
|
|
|
|
- Margin="0,0,0,2" />
|
|
|
|
- <NumericUpDown Minimum="0" Maximum="100" Increment="1"
|
|
|
|
- Value="{CompiledBinding PrintPreview.PrintSettings.Value.MarginLeft.Value, Mode=TwoWay}"
|
|
|
|
- HorizontalAlignment="Stretch"/>
|
|
|
|
- </StackPanel>
|
|
|
|
-
|
|
|
|
- <!-- Right -->
|
|
|
|
- <StackPanel Grid.Column="3">
|
|
|
|
- <TextBlock Text="{CompiledBinding Translation.Right.Value, Mode=OneWay}"
|
|
|
|
- Foreground="{StaticResource SecondaryTextColor}"
|
|
|
|
- FontSize="12"
|
|
|
|
- Margin="0,0,0,2" />
|
|
|
|
- <NumericUpDown Minimum="0" Maximum="100" Increment="1"
|
|
|
|
- Value="{CompiledBinding PrintPreview.PrintSettings.Value.MarginRight.Value, Mode=TwoWay}"
|
|
|
|
- HorizontalAlignment="Stretch"/>
|
|
|
|
- </StackPanel>
|
|
|
|
- </Grid>
|
|
|
|
-
|
|
|
|
-
|
|
|
|
-
|
|
|
|
- </StackPanel>
|
|
|
|
-
|
|
|
|
- <!-- Preview Panel (Right) -->
|
|
|
|
- <Border Grid.Row="0" Grid.Column="1" Background="{DynamicResource DisabledBackgroundColor}" Margin="20, 20, 20, 20" CornerRadius="6">
|
|
|
|
- <Viewbox Stretch="Uniform" StretchDirection="Both" Margin="10">
|
|
|
|
- <Border Width="{CompiledBinding PrintPreview.PageWidth.Value}"
|
|
|
|
- Height="{CompiledBinding PrintPreview.PageHeight.Value}"
|
|
|
|
- Background="White"
|
|
|
|
- BorderBrush="LightGray"
|
|
|
|
- BorderThickness="1"
|
|
|
|
- CornerRadius="2"
|
|
|
|
- Margin="20">
|
|
|
|
- <Border.Effect>
|
|
|
|
- <DropShadowEffect Color="Black"
|
|
|
|
- BlurRadius="15"
|
|
|
|
- OffsetX="4"
|
|
|
|
- OffsetY="4"
|
|
|
|
- Opacity="0.3"/>
|
|
|
|
- </Border.Effect>
|
|
|
|
-
|
|
|
|
- <Image Source="{CompiledBinding PrintPreview.PreviewImage.Value}" Stretch="Fill" />
|
|
|
|
- </Border>
|
|
|
|
- </Viewbox>
|
|
|
|
- </Border>
|
|
|
|
-
|
|
|
|
-
|
|
|
|
-
|
|
|
|
- <Rectangle Grid.Row="1" Grid.ColumnSpan="2"
|
|
|
|
- Height="1"
|
|
|
|
- Fill="{DynamicResource MainBorderColor}"
|
|
|
|
- VerticalAlignment="Top" />
|
|
|
|
-
|
|
|
|
- <!-- Footer Buttons -->
|
|
|
|
- <StackPanel Grid.Row="2" Grid.ColumnSpan="2"
|
|
|
|
- Orientation="Horizontal"
|
|
|
|
- HorizontalAlignment="Right"
|
|
|
|
- Spacing="8"
|
|
|
|
- Margin="0,10,0,0">
|
|
|
|
-
|
|
|
|
- <customControls:TextIconButton x:Name="PrintButton"
|
|
|
|
- Background="{DynamicResource AccentColor}"
|
|
|
|
- Classes="ButtonBorder accentHover"
|
|
|
|
- Command="{CompiledBinding PrintPreview.PrintCommand}"
|
|
|
|
- Data="{StaticResource PrintGeometry}"
|
|
|
|
- Foreground="{DynamicResource MainTextColor}"
|
|
|
|
- Height="46"
|
|
|
|
- Width="120"
|
|
|
|
- IconHeight="17"
|
|
|
|
- IconMargin="9,0,9,0"
|
|
|
|
- IconWidth="17"
|
|
|
|
- Text="{CompiledBinding Translation.Print.Value, Mode=OneWay}"
|
|
|
|
- ToolTip.Tip="{CompiledBinding Translation.Print.Value, Mode=OneWay}"
|
|
|
|
- TextMargin="16,0,16,0"/>
|
|
|
|
-
|
|
|
|
- <customControls:TextIconButton x:Name="CancelButton"
|
|
|
|
|
|
+ Value="{CompiledBinding PrintPreview.PrintSettings.Value.Copies.Value,
|
|
|
|
+ Mode=TwoWay}" />
|
|
|
|
+
|
|
|
|
+ <!-- Margins -->
|
|
|
|
+ <TextBlock
|
|
|
|
+ Classes="txt"
|
|
|
|
+ FontFamily="/Assets/Fonts/Roboto-Bold.ttf#Roboto"
|
|
|
|
+ FontSize="14"
|
|
|
|
+ Margin="0,6,0,0"
|
|
|
|
+ Text="{CompiledBinding Translation.Margins.Value,
|
|
|
|
+ Mode=OneWay}" />
|
|
|
|
+
|
|
|
|
+ <Grid
|
|
|
|
+ ColumnDefinitions="*,*,*,*"
|
|
|
|
+ ColumnSpacing="6"
|
|
|
|
+ Margin="0,0,0,0">
|
|
|
|
+
|
|
|
|
+ <!-- Top -->
|
|
|
|
+ <StackPanel Grid.Column="0">
|
|
|
|
+ <TextBlock
|
|
|
|
+ Classes="txt"
|
|
|
|
+ Margin="0,0,0,2"
|
|
|
|
+ Text="{CompiledBinding Translation.Top.Value,
|
|
|
|
+ Mode=OneWay}" />
|
|
|
|
+ <NumericUpDown
|
|
|
|
+ FontFamily="/Assets/Fonts/Roboto-Regular.ttf#Roboto"
|
|
|
|
+ Foreground="{DynamicResource MainTextColor}"
|
|
|
|
+ HorizontalAlignment="Stretch"
|
|
|
|
+ Increment="1"
|
|
|
|
+ Maximum="100"
|
|
|
|
+ Minimum="0"
|
|
|
|
+ Value="{CompiledBinding PrintPreview.PrintSettings.Value.MarginTop.Value,
|
|
|
|
+ Mode=TwoWay}" />
|
|
|
|
+ </StackPanel>
|
|
|
|
+
|
|
|
|
+ <!-- Bottom -->
|
|
|
|
+ <StackPanel Grid.Column="1">
|
|
|
|
+ <TextBlock
|
|
|
|
+ Classes="txt"
|
|
|
|
+ Margin="0,0,0,2"
|
|
|
|
+ Text="{CompiledBinding Translation.Bottom.Value,
|
|
|
|
+ Mode=OneWay}" />
|
|
|
|
+ <NumericUpDown
|
|
|
|
+ FontFamily="/Assets/Fonts/Roboto-Regular.ttf#Roboto"
|
|
|
|
+ Foreground="{DynamicResource MainTextColor}"
|
|
|
|
+ HorizontalAlignment="Stretch"
|
|
|
|
+ Increment="1"
|
|
|
|
+ Maximum="100"
|
|
|
|
+ Minimum="0"
|
|
|
|
+ Value="{CompiledBinding PrintPreview.PrintSettings.Value.MarginBottom.Value,
|
|
|
|
+ Mode=TwoWay}" />
|
|
|
|
+ </StackPanel>
|
|
|
|
+
|
|
|
|
+ <!-- Left -->
|
|
|
|
+ <StackPanel Grid.Column="2">
|
|
|
|
+ <TextBlock
|
|
|
|
+ Classes="txt"
|
|
|
|
+ Margin="0,0,0,2"
|
|
|
|
+ Text="{CompiledBinding Translation.Left.Value,
|
|
|
|
+ Mode=OneWay}" />
|
|
|
|
+ <NumericUpDown
|
|
|
|
+ FontFamily="/Assets/Fonts/Roboto-Regular.ttf#Roboto"
|
|
|
|
+ Foreground="{DynamicResource MainTextColor}"
|
|
|
|
+ HorizontalAlignment="Stretch"
|
|
|
|
+ Increment="1"
|
|
|
|
+ Maximum="100"
|
|
|
|
+ Minimum="0"
|
|
|
|
+ Value="{CompiledBinding PrintPreview.PrintSettings.Value.MarginLeft.Value,
|
|
|
|
+ Mode=TwoWay}" />
|
|
|
|
+ </StackPanel>
|
|
|
|
+
|
|
|
|
+ <!-- Right -->
|
|
|
|
+ <StackPanel Grid.Column="3">
|
|
|
|
+ <TextBlock
|
|
|
|
+ Classes="txt"
|
|
|
|
+ Margin="0,0,0,2"
|
|
|
|
+ Text="{CompiledBinding Translation.Right.Value,
|
|
|
|
+ Mode=OneWay}" />
|
|
|
|
+ <NumericUpDown
|
|
|
|
+ FontFamily="/Assets/Fonts/Roboto-Regular.ttf#Roboto"
|
|
|
|
+ Foreground="{DynamicResource MainTextColor}"
|
|
|
|
+ HorizontalAlignment="Stretch"
|
|
|
|
+ Increment="1"
|
|
|
|
+ Maximum="100"
|
|
|
|
+ Minimum="0"
|
|
|
|
+ Value="{CompiledBinding PrintPreview.PrintSettings.Value.MarginRight.Value,
|
|
|
|
+ Mode=TwoWay}" />
|
|
|
|
+ </StackPanel>
|
|
|
|
+ </Grid>
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ </StackPanel>
|
|
|
|
+
|
|
|
|
+ <!-- Preview Panel (Right) -->
|
|
|
|
+ <Border
|
|
|
|
+ Background="{DynamicResource DisabledBackgroundColor}"
|
|
|
|
+ CornerRadius="6"
|
|
|
|
+ Grid.Column="1"
|
|
|
|
+ Grid.Row="0"
|
|
|
|
+ Margin="20,20,20,20">
|
|
|
|
+ <Viewbox
|
|
|
|
+ Margin="10"
|
|
|
|
+ Stretch="Uniform"
|
|
|
|
+ StretchDirection="Both">
|
|
|
|
+ <Border
|
|
|
|
+ Background="White"
|
|
|
|
+ BorderBrush="LightGray"
|
|
|
|
+ BorderThickness="1"
|
|
|
|
+ CornerRadius="2"
|
|
|
|
+ Height="{CompiledBinding PrintPreview.PageHeight.Value}"
|
|
|
|
+ Margin="20"
|
|
|
|
+ Width="{CompiledBinding PrintPreview.PageWidth.Value}">
|
|
|
|
+ <Border.Effect>
|
|
|
|
+ <DropShadowEffect
|
|
|
|
+ BlurRadius="15"
|
|
|
|
+ Color="Black"
|
|
|
|
+ OffsetX="4"
|
|
|
|
+ OffsetY="4"
|
|
|
|
+ Opacity="0.3" />
|
|
|
|
+ </Border.Effect>
|
|
|
|
+
|
|
|
|
+ <Image Source="{CompiledBinding PrintPreview.PreviewImage.Value}" Stretch="Fill" />
|
|
|
|
+ </Border>
|
|
|
|
+ </Viewbox>
|
|
|
|
+ </Border>
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ <Rectangle
|
|
|
|
+ Fill="{DynamicResource MainBorderColor}"
|
|
|
|
+ Grid.ColumnSpan="2"
|
|
|
|
+ Grid.Row="1"
|
|
|
|
+ Height="1"
|
|
|
|
+ VerticalAlignment="Top" />
|
|
|
|
+
|
|
|
|
+ <!-- Footer Buttons -->
|
|
|
|
+ <StackPanel
|
|
|
|
+ Grid.ColumnSpan="2"
|
|
|
|
+ Grid.Row="2"
|
|
|
|
+ HorizontalAlignment="Right"
|
|
|
|
+ Margin="0,10,0,0"
|
|
|
|
+ Orientation="Horizontal"
|
|
|
|
+ Spacing="8">
|
|
|
|
+
|
|
|
|
+ <customControls:TextIconButton
|
|
Background="{DynamicResource MenuButtonColor}"
|
|
Background="{DynamicResource MenuButtonColor}"
|
|
Classes="ButtonBorder altHover"
|
|
Classes="ButtonBorder altHover"
|
|
Command="{CompiledBinding PrintPreview.CancelCommand}"
|
|
Command="{CompiledBinding PrintPreview.CancelCommand}"
|
|
Data="{StaticResource CloseGeometry}"
|
|
Data="{StaticResource CloseGeometry}"
|
|
Foreground="{DynamicResource MainTextColor}"
|
|
Foreground="{DynamicResource MainTextColor}"
|
|
Height="46"
|
|
Height="46"
|
|
- Width="120"
|
|
|
|
- IconHeight="17"
|
|
|
|
- IconMargin="9,0,9,0"
|
|
|
|
- IconWidth="17"
|
|
|
|
- Text="{CompiledBinding Translation.Cancel.Value, Mode=OneWay}"
|
|
|
|
- ToolTip.Tip="{CompiledBinding Translation.Cancel.Value, Mode=OneWay}"
|
|
|
|
- TextMargin="16,0,16,0" />
|
|
|
|
- </StackPanel>
|
|
|
|
- </Grid>
|
|
|
|
- </Panel>
|
|
|
|
|
|
+ IconHeight="14"
|
|
|
|
+ IconMargin="15,0,2,0"
|
|
|
|
+ IconWidth="14"
|
|
|
|
+ Text="{CompiledBinding Translation.Cancel.Value,
|
|
|
|
+ Mode=OneWay}"
|
|
|
|
+ TextMargin="16,0,16,0"
|
|
|
|
+ ToolTip.Tip="{CompiledBinding Translation.Cancel.Value,
|
|
|
|
+ Mode=OneWay}"
|
|
|
|
+ Width="140"
|
|
|
|
+ x:Name="CancelButton" />
|
|
|
|
+
|
|
|
|
+ <customControls:TextIconButton
|
|
|
|
+ Background="{DynamicResource AccentColor}"
|
|
|
|
+ Classes="ButtonBorder accentHover"
|
|
|
|
+ Command="{CompiledBinding PrintPreview.PrintCommand}"
|
|
|
|
+ Data="{StaticResource PrintGeometry}"
|
|
|
|
+ Foreground="{DynamicResource MainTextColor}"
|
|
|
|
+ Height="46"
|
|
|
|
+ IconHeight="16"
|
|
|
|
+ IconMargin="15,0,2,0"
|
|
|
|
+ IconWidth="16"
|
|
|
|
+ Text="{CompiledBinding Translation.Print.Value,
|
|
|
|
+ Mode=OneWay}"
|
|
|
|
+ TextMargin="16,0,16,0"
|
|
|
|
+ ToolTip.Tip="{CompiledBinding Translation.Print.Value,
|
|
|
|
+ Mode=OneWay}"
|
|
|
|
+ Width="140"
|
|
|
|
+ x:Name="PrintButton" />
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ </StackPanel>
|
|
|
|
+ </Grid>
|
|
|
|
+ </Panel>
|
|
</UserControl>
|
|
</UserControl>
|