|
17 | 17 | <RowDefinition Height="*" /> |
18 | 18 | <RowDefinition Height="Auto" /> |
19 | 19 | </Grid.RowDefinitions> |
20 | | - <Grid.ColumnDefinitions> |
21 | | - <ColumnDefinition /> |
22 | | - <ColumnDefinition /> |
23 | | - </Grid.ColumnDefinitions> |
24 | 20 | <WrapPanel> |
25 | 21 | <CheckBox |
26 | 22 | x:Name="myCheckBox" |
| 23 | + wd:ElementHelper.CornerRadius="3" |
27 | 24 | Content="开启等比缩放" |
28 | 25 | IsChecked="False" /> |
29 | | - <StackPanel Orientation="Horizontal"> |
| 26 | + <StackPanel Margin="10,0" Orientation="Horizontal"> |
30 | 27 | <TextBlock VerticalAlignment="Center" Text="裁剪区域比例:" /> |
31 | 28 | <Slider |
32 | 29 | x:Name="myRectScaleSlider" |
33 | 30 | Width="100" |
| 31 | + wd:ElementHelper.CornerRadius="3" |
34 | 32 | Maximum="1" |
35 | 33 | Minimum="0" |
36 | 34 | Value="0.5" /> |
|
40 | 38 | <wd:CropImage |
41 | 39 | Name="MyCropImage" |
42 | 40 | Grid.Row="1" |
43 | | - Grid.Column="0" |
44 | 41 | IsRatioScale="{Binding ElementName=myCheckBox, Path=IsChecked}" |
45 | 42 | RectScale="{Binding ElementName=myRectScaleSlider, Path=Value}" |
46 | 43 | ScaleSize="2.35,1" /> |
47 | | - <Image |
48 | | - Grid.Row="1" |
49 | | - Grid.Column="1" |
50 | | - Width="{Binding CurrentRect.Width, ElementName=MyCropImage}" |
51 | | - Height="{Binding CurrentRect.Height, ElementName=MyCropImage}" |
52 | | - VerticalAlignment="Center" |
53 | | - Source="{Binding CurrentAreaBitmap, ElementName=MyCropImage}" |
54 | | - Stretch="Uniform" /> |
55 | 44 | <StackPanel |
56 | 45 | Grid.Row="2" |
57 | | - Grid.ColumnSpan="2" |
| 46 | + Margin="0,10" |
58 | 47 | HorizontalAlignment="Center" |
| 48 | + VerticalAlignment="Center" |
| 49 | + wd:PanelHelper.Spacing="3" |
59 | 50 | Orientation="Horizontal"> |
60 | 51 | <Button |
61 | | - Margin="0,20,10,20" |
| 52 | + wd:ElementHelper.CornerRadius="3" |
62 | 53 | Click="OnImportClickHandler" |
63 | 54 | Content="选择图片" |
64 | 55 | Style="{StaticResource WD.PrimaryButton}" /> |
65 | 56 | <Button |
66 | | - Margin="0,20,10,20" |
| 57 | + wd:ElementHelper.CornerRadius="3" |
67 | 58 | Click="BtnSave_Click" |
68 | 59 | Content="保存图片" |
69 | 60 | Style="{StaticResource WD.SuccessPrimaryButton}" /> |
|
0 commit comments