123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215 |
- <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}">
- </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>
- <Button
- Margin="4,0,0,0"
- Width="32"
- Height="32"
- Command="{Binding FlipleftrightCommand}"
- IsEnabled="{Binding IsCrop, Converter={StaticResource InvertBoolConvert}}"
- Style="{StaticResource subToolBar}">
- <Path Data="M15.926 22.1667V24.5H13.5927V22.1667H15.926ZM5.42595 4.86733C5.61373 4.86725 5.79876 4.91249 5.96531 4.99922C6.13187 5.08595 6.27503 5.2116 6.38262 5.3655L11.9582 13.3315C12.0952 13.5275 12.1687 13.7609 12.1687 14C12.1687 14.2391 12.0952 14.4725 11.9582 14.6685L6.38146 22.6345C6.23915 22.8376 6.03582 22.9901 5.80097 23.0698C5.56612 23.1495 5.31197 23.1524 5.07542 23.0778C4.83887 23.0033 4.63222 22.8554 4.48546 22.6554C4.3387 22.4555 4.25947 22.214 4.25928 21.966V6.034C4.25928 5.72458 4.38219 5.42783 4.60099 5.20904C4.81978 4.99025 5.11653 4.86733 5.42595 4.86733ZM24.0927 4.86733C24.3787 4.8674 24.6546 4.97248 24.8682 5.1626C25.0818 5.35273 25.2181 5.61466 25.2512 5.89867L25.2594 6.034V21.966C25.259 22.2013 25.1875 22.431 25.0542 22.625C24.9209 22.8189 24.7321 22.968 24.5125 23.0527C24.2929 23.1373 24.0529 23.1536 23.8239 23.0994C23.5949 23.0452 23.3877 22.923 23.2294 22.7488L23.1361 22.6345L17.5605 14.6685C17.4392 14.4949 17.3673 14.2916 17.3527 14.0803C17.3381 13.869 17.3813 13.6578 17.4777 13.4692L17.5605 13.3315L23.1372 5.3655C23.2447 5.21176 23.3877 5.08621 23.554 4.99949C23.7204 4.91277 23.9052 4.86744 24.0927 4.86733ZM15.926 17.5V19.8333H13.5927V17.5H15.926ZM6.12596 8.7255V19.6L9.94565 14L6.12712 8.7255H6.12596ZM15.926 12.8333V15.1667H13.5927V12.8333H15.926ZM15.926 8.16667V10.5H13.5927V8.16667H15.926ZM15.926 3.5V5.83333H13.5927V3.5H15.926Z" Fill="{StaticResource color.icon.base.brand}" />
- </Button>
- <Button
- Margin="6,0,0,0"
- Width="32"
- Height="32"
- Command="{Binding UpsidedownCommand}"
- IsEnabled="{Binding IsCrop, Converter={StaticResource InvertBoolConvert}}"
- Style="{StaticResource subToolBar}">
- <Path Data="M2.5936 12.1667H0.260254V9.83333H2.5936V12.1667ZM19.893 1.66667C19.8931 1.85445 19.8479 2.03947 19.7612 2.20603C19.6744 2.37258 19.5488 2.51573 19.3949 2.62333L11.4288 8.19883C11.2328 8.33586 10.9995 8.40935 10.7603 8.40935C10.5212 8.40935 10.2878 8.33586 10.0918 8.19883L2.12577 2.62217C1.92264 2.47986 1.77016 2.27653 1.69044 2.04168C1.61072 1.80683 1.60791 1.55269 1.68243 1.31614C1.75694 1.07959 1.9049 0.872936 2.10483 0.726179C2.30476 0.579423 2.54626 0.500197 2.79427 0.5H18.7264C19.0358 0.5 19.3325 0.622916 19.5513 0.841709C19.7701 1.0605 19.893 1.35725 19.893 1.66667ZM19.893 20.3333C19.893 20.6193 19.7879 20.8952 19.5978 21.1088C19.4076 21.3224 19.1457 21.4587 18.8617 21.4918L18.7264 21.5H2.79427C2.55894 21.4996 2.32923 21.4281 2.1353 21.2948C1.94137 21.1615 1.79228 20.9727 1.7076 20.7531C1.62293 20.5335 1.60664 20.2935 1.66086 20.0645C1.71508 19.8355 1.83729 19.6283 2.01143 19.47L2.12577 19.3767L10.0918 13.8012C10.2654 13.6798 10.4687 13.608 10.68 13.5934C10.8913 13.5788 11.1026 13.622 11.2912 13.7183L11.4288 13.8012L19.3949 19.3778C19.5486 19.4853 19.6742 19.6283 19.7609 19.7946C19.8476 19.961 19.8929 20.1458 19.893 20.3333ZM7.2603 12.1667H4.92695V9.83333H7.2603V12.1667ZM16.0349 2.36667H5.16029L10.7603 6.18633L16.0349 2.369V2.36667ZM11.927 12.1667H9.59365V9.83333H11.927V12.1667ZM16.5937 12.1667H14.2603V9.83333H16.5937V12.1667ZM21.2604 12.1667H18.927V9.83333H21.2604V12.1667Z" Fill="{StaticResource color.icon.base.brand}" />
- </Button>
- </StackPanel>
- <CompositeControl:SlidComboControl
- x:Name="slid"
-
- IsEnabled="{Binding IsCrop, Converter={StaticResource InvertBoolConvert}}"
- Title="{Binding Opacity,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"
- 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"
- 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
- Visibility="Collapsed"
- 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
- Visibility="Collapsed"
- 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>
|