Welcome to mirror list, hosted at ThFree Co, Russian Federation.

ToolChangeResolutionControl.axaml « Tools « Controls « UVtools.WPF - github.com/sn4k3/UVtools.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 5cc041e173bc534346dcf02fa19b6a6cb9a4446b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
<UserControl xmlns="https://github.com/avaloniaui"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
             mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
             x:Class="UVtools.WPF.Controls.Tools.ToolChangeResolutionControl">
  <StackPanel Orientation="Vertical" Spacing="10">
    <TextBlock Text="{Binding Operation.SlicerFile.Resolution, StringFormat=Current resolution (X/Y): {0}}"/>
    <TextBlock Text="{Binding Operation.SlicerFile.PixelSizeMicrons, StringFormat=Current pixel pitch (X/Y): {0}µm}"/>
    <TextBlock Text="{Binding SlicerFile.BoundingRectangle.Size, StringFormat=Object volume (X/Y): {0}}"/>
    <TextBlock FontWeight="Bold">
        <TextBlock.Text>
            <MultiBinding StringFormat="Resulting pixel ratio: {{X={0}x, Y={1}x}}">
                <Binding Path="Operation.NewRatioX"/>
                <Binding Path="Operation.NewRatioY"/>
            </MultiBinding>
        </TextBlock.Text>
    </TextBlock>

    <Grid RowDefinitions="Auto,10,Auto"
          ColumnDefinitions="Auto,10,Auto,5,Auto,5,Auto,10,Auto">

      <TextBlock Grid.Row="0" Grid.Column="0"
                 VerticalAlignment="Center" Text="New X/Y:"/>

      <NumericUpDown Grid.Row="0" Grid.Column="2"
                     MinWidth="120"
                     Minimum="1"
                     Maximum="50000"
                     Width="150"
                     Value="{Binding Operation.NewResolutionX}"/>

      <TextBlock Grid.Row="0" Grid.Column="4" VerticalAlignment="Center" Text="x"/>

      <NumericUpDown Grid.Row="0" Grid.Column="6"
                     MinWidth="120"
                     Minimum="1"
                     Maximum="50000"
                     Width="150"
                     Value="{Binding Operation.NewResolutionY}"/>

      <ComboBox Grid.Row="0" Grid.Column="8"
                MinWidth="250"
                SelectedItem="{Binding SelectedPresetItem}"
                Items="{Binding Operation.Presets}"
                PlaceholderText="Resolution presets"/>

      <TextBlock Grid.Row="2" Grid.Column="0"
                 VerticalAlignment="Center" Text="Fix pixel ratio:"/>

      <NumericUpDown Grid.Row="2" Grid.Column="2"
                     Classes="ValueLabel ValueLabel_times ReadOnly"
                     FormatString="F2"
                     MinWidth="120"
                     Width="150"
                     IsEnabled="{Binding Operation.FixRatio}"
                     Value="{Binding Operation.NewFixedRatioX}"/>

      <TextBlock Grid.Row="2" Grid.Column="4" VerticalAlignment="Center" Text="x"/>

      <NumericUpDown Grid.Row="2" Grid.Column="6"
                     Classes="ValueLabel ValueLabel_times ReadOnly"
                     FormatString="F2"
                     MinWidth="120"
                     Width="150"
                     IsEnabled="{Binding Operation.FixRatio}"
                     Value="{Binding Operation.NewFixedRatioY}"/>

      <CheckBox Grid.Row="2" Grid.Column="8"
                Content="Resize layers with proposed ratio"
                IsChecked="{Binding Operation.FixRatio}"
                ToolTip.Tip="Fix the pixel ratio by resize the layers images with the proposed ratio to match the new resolution.
&#x0a;Only use this option when both source and target display have the same dimensions / build volume. 
Otherwise, the new display size must be taken into account and you need to manually resize after this."/>
    </Grid>
    
    
  </StackPanel>
</UserControl>