123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219 |
- <UserControl
- x:Class="PDF_Master.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_Master.CustomControl.CompositeControl"
- xmlns:Convert="clr-namespace:PDF_Master.DataConvert"
- xmlns:FormControl="clr-namespace:PDF_Master.CustomControl.Form"
- xmlns:cus="clr-namespace:PDF_Master.CustomControl"
- xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
- xmlns:local="clr-namespace:PDF_Master.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">
- Edit 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}" />
- </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>
- <Button
- Width="32"
- Height="32"
- Margin="4,0,0,0"
- Command="{Binding FlipleftrightCommand}"
- IsEnabled="{Binding IsCrop, Converter={StaticResource InvertBoolConvert}}"
- Style="{StaticResource subToolBar}">
- <Path Data="M8.66647 12.6667V14H7.33313V12.6667H8.66647ZM2.66643 2.78133C2.77373 2.78129 2.87946 2.80714 2.97464 2.8567C3.06981 2.90626 3.15161 2.97806 3.2131 3.066L6.39912 7.618C6.47742 7.73 6.51942 7.86335 6.51942 8C6.51942 8.13665 6.47742 8.27001 6.39912 8.382L3.21243 12.934C3.13111 13.0501 3.01492 13.1372 2.88072 13.1828C2.74652 13.2283 2.6013 13.2299 2.46612 13.1873C2.33095 13.1448 2.21286 13.0602 2.129 12.946C2.04514 12.8317 1.99987 12.6937 1.99976 12.552V3.448C1.99976 3.27119 2.06999 3.10162 2.19502 2.9766C2.32004 2.85157 2.48962 2.78133 2.66643 2.78133ZM13.3332 2.78133C13.4966 2.78137 13.6543 2.84142 13.7763 2.95006C13.8983 3.0587 13.9762 3.20838 13.9952 3.37067L13.9998 3.448V12.552C13.9996 12.6865 13.9588 12.8177 13.8826 12.9286C13.8064 13.0394 13.6985 13.1246 13.573 13.1729C13.4476 13.2213 13.3104 13.2306 13.1796 13.1997C13.0487 13.1687 12.9303 13.0988 12.8398 12.9993L12.7865 12.934L9.60048 8.382C9.53113 8.28282 9.49008 8.16663 9.48174 8.0459C9.4734 7.92517 9.49809 7.80444 9.55314 7.69667L9.60048 7.618L12.7872 3.066C12.8486 2.97815 12.9303 2.90641 13.0253 2.85685C13.1204 2.8073 13.226 2.78139 13.3332 2.78133ZM8.66647 10V11.3333H7.33313V10H8.66647ZM3.06643 4.986V11.2L5.24911 8L3.0671 4.986H3.06643ZM8.66647 7.33333V8.66667H7.33313V7.33333H8.66647ZM8.66647 4.66667V6H7.33313V4.66667H8.66647ZM8.66647 2V3.33333H7.33313V2H8.66647Z" Fill="{StaticResource color.icon.base.brand}" />
- </Button>
- <Button
- Width="32"
- Height="32"
- Margin="6,0,0,0"
- Command="{Binding UpsidedownCommand}"
- IsEnabled="{Binding IsCrop, Converter={StaticResource InvertBoolConvert}}"
- Style="{StaticResource subToolBar}">
- <Path Data="M3.33383 8.66667H2.00049V7.33333H3.33383V8.66667ZM13.2192 2.66667C13.2193 2.77397 13.1934 2.8797 13.1439 2.97487C13.0943 3.07004 13.0225 3.15185 12.9346 3.21333L8.38253 6.39933C8.27054 6.47764 8.13719 6.51963 8.00053 6.51963C7.86388 6.51963 7.73052 6.47764 7.61853 6.39933L3.0665 3.21267C2.95043 3.13135 2.86329 3.01516 2.81774 2.88096C2.77218 2.74676 2.77058 2.60154 2.81316 2.46636C2.85574 2.33119 2.94029 2.21311 3.05453 2.12925C3.16878 2.04538 3.30678 2.00011 3.4485 2H12.5526C12.7294 2 12.8989 2.07024 13.024 2.19526C13.149 2.32029 13.2192 2.48986 13.2192 2.66667ZM13.2192 13.3333C13.2192 13.4967 13.1592 13.6544 13.0505 13.7765C12.9419 13.8985 12.7922 13.9764 12.6299 13.9953L12.5526 14H3.4485C3.31403 13.9998 3.18276 13.9589 3.07194 13.8827C2.96113 13.8066 2.87593 13.6987 2.82755 13.5732C2.77916 13.4477 2.76985 13.3106 2.80084 13.1797C2.83182 13.0489 2.90165 12.9304 3.00116 12.84L3.0665 12.7867L7.61853 9.60067C7.71771 9.53132 7.8339 9.49027 7.95463 9.48193C8.07537 9.47359 8.19609 9.49827 8.30387 9.55333L8.38253 9.60067L12.9346 12.7873C13.0224 12.8488 13.0942 12.9305 13.1437 13.0255C13.1933 13.1205 13.2192 13.2261 13.2192 13.3333ZM6.00052 8.66667H4.66717V7.33333H6.00052V8.66667ZM11.0146 3.06667H4.80051L8.00053 5.24933L11.0146 3.068V3.06667ZM8.6672 8.66667H7.33386V7.33333H8.6672V8.66667ZM11.3339 8.66667H10.0005V7.33333H11.3339V8.66667ZM14.0006 8.66667H12.6672V7.33333H14.0006V8.66667Z" Fill="{StaticResource color.icon.base.brand}" />
- </Button>
- </StackPanel>
- <CompositeControl:SlidComboControl
- x:Name="slid"
- Title="{Binding Opacity, Mode=TwoWay}"
- IsEnabled="{Binding IsCrop, Converter={StaticResource InvertBoolConvert}}"
- SelectedIndex="{Binding OpacitySelectedIndex, Mode=TwoWay}"
- Unit="%"
- Value="{Binding Transpent, Mode=TwoWay}">
- <i:Interaction.Triggers>
- <i:EventTrigger EventName="PreviewMouseLeftButtonUp">
- <i:InvokeCommandAction Command="{Binding TranspentslidCommand}" PassEventArgsToCommand="True" />
- </i:EventTrigger>
- </i:Interaction.Triggers>
- </CompositeControl:SlidComboControl>
- <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"
- Focusable="False"
- 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="Crop"
- Focusable="False"
- FontSize="14"
- Style="{StaticResource Btn.cta}" />
- <Button
- Grid.Column="2"
- Background="White"
- BorderBrush="#DFE1E5"
- BorderThickness="1"
- Command="{Binding CancelCropCommand}"
- Content="Cancel"
- Focusable="False"
- 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="Export" />
- </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"
- Visibility="Collapsed">
- Align
- </TextBlock>
- <FormControl:LayoutAglinContent
- x:Name="laoutAglin"
- IsLayoutAlign="{Binding IsLayoutAlign}"
- IsLayoutAvgAlign="{Binding IsLayoutAvgAlign}"
- Visibility="Collapsed">
- <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>
|