123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186 |
- <UserControl
- x:Class="PDF_Office.Views.PropertyPanel.PDFEdit.ImageEditProperty"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:CompositeControl="clr-namespace:PDF_Office.CustomControl.CompositeControl"
- xmlns:Convert="clr-namespace:PDF_Office.DataConvert"
- xmlns:FormControl="clr-namespace:PDF_Office.CustomControl.Form"
- xmlns:cus="clr-namespace:PDF_Office.CustomControl"
- xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
- xmlns:local="clr-namespace:PDF_Office.Views.PropertyPanel.PDFEdit"
- xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:prism="http://prismlibrary.com/"
- d:DesignHeight="600"
- d:DesignWidth="260"
- prism:ViewModelLocator.AutoWireViewModel="True"
- mc:Ignorable="d">
- <UserControl.Resources>
- <ResourceDictionary>
- <ResourceDictionary.MergedDictionaries>
- <ResourceDictionary Source="../../../Styles/SliderStyle.xaml" />
- <ResourceDictionary Source="../../../Styles/CustomBtnStyle.xaml" />
- <ResourceDictionary Source="../../../Styles/RadioButtonStyle.xaml" />
- </ResourceDictionary.MergedDictionaries>
- <Convert:BoolToVisible x:Key="BoolToVisible" />
- <Convert:InvertBoolToVisibleConvert x:Key="InvertBoolToVisibleConvert" />
- <Convert:InvertBoolConvert x:Key="InvertBoolConvert" />
- </ResourceDictionary>
- </UserControl.Resources>
- <Grid Background="{StaticResource color.sys.layout.mg}">
- <StackPanel Margin="16,14">
- <TextBlock
- Name="AnnotTypeTitle1"
- HorizontalAlignment="Left"
- FontFamily="Segoe UI"
- FontSize="14"
- FontWeight="SemiBold"
- LineHeight="24">
- Image
- </TextBlock>
- <Border
- Width="228"
- Height="88"
- Margin="0,8,0,0"
- Background="{StaticResource color.field.bg.def}"
- BorderBrush="{StaticResource color.field.border.norm}"
- BorderThickness="1"
- CornerRadius="2"
- Visibility="{Binding IsMultiSelectImage, Converter={StaticResource InvertBoolToVisibleConvert}}">
- <Grid>
- <Border
- Name="FreeTextBorder1"
- Padding="5"
- HorizontalAlignment="Center"
- VerticalAlignment="Center" Opacity="{Binding OpacityUI,Mode=OneWay}">
- <Image x:Name="ImgExmple" Source="{Binding CurrentImg}">
- </Image>
- </Border>
- </Grid>
- </Border>
- <StackPanel
- Margin="0,8,0,0"
- HorizontalAlignment="Center"
- Orientation="Horizontal">
- <Button
- Width="32"
- Height="32"
- Margin="0,0,8,0"
- Command="{Binding AntiClockwiseCommand}"
- IsEnabled="{Binding IsCrop, Converter={StaticResource InvertBoolConvert}}"
- Style="{StaticResource subToolBar}">
- <Path Data="M11.9784 2.52529C8.94121 0.771787 5.05761 1.81239 3.30411 4.84955C3.00688 5.36436 2.78981 5.90407 2.64922 6.45385L2.1804 4.70416L0.731506 5.09239L1.68396 8.647C1.79117 9.0471 2.20242 9.28453 2.60252 9.17733L6.15713 8.22487L5.7689 6.77598L4.01473 7.24601C4.10628 6.68216 4.2999 6.1248 4.60315 5.59955C5.94244 3.27983 8.90865 2.48504 11.2284 3.82433C13.5481 5.16362 14.3429 8.12983 13.0036 10.4496C11.6643 12.7693 8.69809 13.5641 6.37837 12.2248L5.62837 13.5238C8.66553 15.2773 12.5491 14.2367 14.3026 11.1996C16.0561 8.16239 15.0155 4.2788 11.9784 2.52529Z" Fill="{StaticResource color.icon.base.brand}" />
- </Button>
- <Button
- Width="32"
- Height="32"
- Command="{Binding ClockwiseCommand}"
- IsEnabled="{Binding IsCrop, Converter={StaticResource InvertBoolConvert}}"
- Style="{StaticResource subToolBar}">
- <Path Data="M11.9922 7.24898C11.6312 4.92704 9.62312 3.15002 7.19998 3.15002C4.52139 3.15002 2.34998 5.32144 2.34998 8.00002C2.34998 10.6786 4.52139 12.85 7.19998 12.85C8.08462 12.85 8.91183 12.6139 9.62443 12.2016L10.3755 13.5C9.44076 14.0408 8.35534 14.35 7.19998 14.35C3.69297 14.35 0.849976 11.507 0.849976 8.00002C0.849976 4.49302 3.69297 1.65002 7.19998 1.65002C10.1642 1.65002 12.6541 3.68116 13.3538 6.42761L13.8156 4.7042L15.2645 5.09243L14.312 8.64704C14.2048 9.04714 13.7935 9.28457 13.3934 9.17737L9.83884 8.22491L10.2271 6.77602L11.9922 7.24898Z" Fill="{StaticResource color.icon.base.brand}" />
- </Button>
- </StackPanel>
- <CompositeControl:SlidComboControl
- x:Name="slid"
- IsEnabled="{Binding IsCrop, Converter={StaticResource InvertBoolConvert}}"
- Value="{Binding Transpent, Mode=TwoWay}" />
- <StackPanel
- Width="228"
- Margin="0,16,0,0"
- HorizontalAlignment="Center">
- <Grid x:Name="GridCrop" Visibility="{Binding IsMultiSelectImage, Converter={StaticResource InvertBoolToVisibleConvert}}">
- <Button
- x:Name="BtnCrop"
- Height="32"
- BorderBrush="#DFE1E5"
- BorderThickness="1"
- Command="{Binding CropModeCommand}"
- Content="Crop"
- ContentStringFormat="156"
- FontSize="14"
- Foreground="Black"
- Style="{StaticResource btn.sec}"
- Tag="Crop"
- Visibility="{Binding IsCrop, Converter={StaticResource InvertBoolToVisibleConvert}}" />
- <Grid Visibility="{Binding IsCrop, Converter={StaticResource BoolToVisible}}">
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="*" />
- <ColumnDefinition Width="8" />
- <ColumnDefinition Width="*" />
- </Grid.ColumnDefinitions>
- <Button
- Height="32"
- Command="{Binding CropImgCommand}"
- Content="Confirm Cut"
- FontSize="14"
- Style="{StaticResource Btn.cta}" />
- <Button
- Grid.Column="2"
- Background="White"
- BorderBrush="#DFE1E5"
- BorderThickness="1"
- Command="{Binding CancelCropCommand}"
- Content="Cancel"
- FontSize="14"
- Style="{StaticResource btn.sec}" />
- </Grid>
- </Grid>
- <Button
- x:Name="BtnReplace"
- Height="32"
- Margin="0,8"
- VerticalAlignment="Center"
- BorderBrush="#DFE1E5"
- BorderThickness="1"
- Command="{Binding ReplaceImgCommand}"
- Content="Replace"
- FontSize="14"
- Foreground="Black"
- IsEnabled="{Binding IsCrop, Converter={StaticResource InvertBoolConvert}}"
- Style="{StaticResource btn.sec}"
- Tag="Replace"
- Visibility="{Binding IsMultiSelectImage, Converter={StaticResource InvertBoolToVisibleConvert}}" />
- <Button
- x:Name="BtnExtract"
- Height="32"
- BorderBrush="#DFE1E5"
- BorderThickness="1"
- Command="{Binding ExportImgCommand}"
- ContentStringFormat="156"
- FontSize="14"
- Foreground="Black"
- IsEnabled="{Binding IsCrop, Converter={StaticResource InvertBoolConvert}}"
- Style="{StaticResource btn.sec}"
- Tag="Extract">
- <TextBlock Text="Extract" />
- </Button>
- </StackPanel>
- <TextBlock
- x:Name="AlignImg"
- Margin="0,18,0,10"
- FontFamily="Segoe UI"
- FontSize="12"
- FontWeight="SemiBold"
- Foreground="{StaticResource color.sys.text.neutral.lv2}"
- LineHeight="20">
- Align
- </TextBlock>
- <FormControl:LayoutAglinContent
- x:Name="laoutAglin"
- IsLayoutAlign="{Binding IsLayoutAlign}"
- IsLayoutAvgAlign="{Binding IsLayoutAvgAlign}">
- <i:Interaction.Triggers>
- <i:EventTrigger EventName="ValueChanged">
- <i:InvokeCommandAction Command="{Binding ImgAlignCheckedCommand}" CommandParameter="{Binding ElementName=laoutAglin, Path=Btntag}" />
- </i:EventTrigger>
- </i:Interaction.Triggers>
- </FormControl:LayoutAglinContent>
- </StackPanel>
- </Grid>
- </UserControl>
|