123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254 |
- <UserControl x:Class="PDF_Master.Views.HomePanel.PDFTools.PDFToolsContent"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:local="clr-namespace:PDF_Master.Views.HomePanel.PDFTools"
- xmlns:customControl="clr-namespace:PDF_Master.CustomControl"
- xmlns:converter="clr-namespace:PDF_Master.DataConvert"
- xmlns:prism ="http://prismlibrary.com/"
- prism:ViewModelLocator.AutoWireViewModel="True"
- Background="White" MinWidth="540" MinHeight="460"
- mc:Ignorable="d" Loaded="Page_Loaded"
- d:DesignHeight="450" d:DesignWidth="800"
- >
- <UserControl.Resources>
- <ResourceDictionary>
- <ResourceDictionary.MergedDictionaries>
- <ResourceDictionary Source="../../../Styles/CustomListItemStyle.xaml"/>
- <ResourceDictionary Source="../../../Styles/CustomBtnStyle.xaml"/>
- </ResourceDictionary.MergedDictionaries>
- <converter:BoolToVisible x:Key="BoolToVisibilityConverter" />
- <converter:InvertBoolToVisibleConvert x:Key="InvertBoolToVisibleConvert"/>
- <Style x:Key="LabelSty"
- TargetType="{x:Type Label}">
- <Setter Property="Padding"
- Value="10,5" />
- <Setter Property="Background"
- Value="CadetBlue" />
- <Setter Property="Foreground"
- Value="White" />
- </Style>
- <DataTemplate x:Key="DataTemplate">
- <local:PDFToolItem x:Name="data"/>
- </DataTemplate>
- <DataTemplate x:Key="ExpendDataTemplate">
- <local:PDFToolExpendItem x:Name="Expendata"/>
- </DataTemplate>
- <ItemsPanelTemplate x:Key="ListItemsPanelTemplate">
- <WrapPanel AllowDrop="True"
- Orientation="Horizontal" />
- </ItemsPanelTemplate>
- </ResourceDictionary>
- </UserControl.Resources>
- <Grid x:Name="Grid" Margin="70,51,0,0">
- <Grid.RowDefinitions>
- <RowDefinition Height="auto" />
- <RowDefinition Height="auto" MinHeight="200" />
- <RowDefinition Height="auto" />
- <RowDefinition Height="*" />
- </Grid.RowDefinitions>
- <StackPanel AllowDrop="True"
- DragOver="ListBoxShortCuts_DragOver"
- Drop="ListBoxShortCuts_Drop"
- PreviewMouseMove="ListBoxMoreCuts_PreviewMouseMove"
- >
- <Grid>
- <TextBlock Text="PDF 工具" FontSize="16" FontFamily="PingFang SC"/>
- <Button HorizontalAlignment="Center" Background="Red" Content="清空缓存数据" ToolTip="还在优化中,如果工具排序错乱,或个数不对,可以点击此按钮,回到会设计图最初的布局" Click="Button_Click"/>
- <StackPanel
- x:Name="PnlToolsUIBtns" Grid.ColumnSpan="2"
- Grid.Column="0"
- Margin="0,0,12,0"
- HorizontalAlignment="Right"
- VerticalAlignment="Top"
- Orientation="Horizontal"
- Visibility="{Binding IsDropTools,Converter={StaticResource InvertBoolToVisibleConvert}}">
-
- <Button
- x:Name="BtnCustom" Tag="Custom"
- Width="68"
- Height="28"
- Margin="0,0,0,0"
- Background="#FFFFFF"
- Content="Custom"
- Command="{Binding CustomCommand}"
- CommandParameter="{Binding ElementName=BtnCustom,Path=Tag}"
- Click="BtnTools_Click"
- >
- </Button>
- <Button
- x:Name="BtnMore"
- Width="28"
- Height="28"
- Margin="12,0,0,0"
- Background="#FFFFFF" BorderThickness="0" Content="..."
- Command="{Binding OpenMenuCommand}" CommandParameter="{Binding ElementName=BtnMore}"
- >
- </Button>
- </StackPanel>
- <StackPanel
- x:Name="PnlDropToolsUIBtns" Grid.ColumnSpan="2"
- Grid.Column="0"
- Margin="0,0,12,0"
- HorizontalAlignment="Right"
- VerticalAlignment="Top"
- Orientation="Horizontal"
- Visibility="{Binding IsDropTools,Converter={StaticResource BoolToVisibilityConverter}}">
-
- <Button
- x:Name="BtnCancel" Tag="Cancel"
- Width="68"
- Height="28"
- Margin="0,0,0,0"
- Background="#FFFFFF"
- Content="Cancel"
- CommandParameter="{Binding ElementName=BtnCustom,Path=Tag}"
- Click="BtnTools_Click"
- >
- </Button>
- <Button Tag="Apply"
- x:Name="BtnApply"
- Width="28"
- Height="28"
- Margin="12,0,0,0"
- Background="#FFFFFF" BorderThickness="0" Content="Apply"
- Command="{Binding OpenMenuCommand}" CommandParameter="{Binding ElementName=BtnMore}"
- >
- </Button>
- </StackPanel>
- </Grid>
-
- <TextBlock Text="首页快捷工具" Margin="0,16,0,0" FontSize="14" FontFamily="PingFang SC"/>
- </StackPanel>
- <Label Name="label1" Visibility="Collapsed"
- Grid.Row="0"
- AllowDrop="True"
- Content="快捷工具"
- DragOver="ListBoxShortCuts_DragOver"
- Drop="ListBoxShortCuts_Drop"
- FontSize="20"
- PreviewMouseMove="ListBoxMoreCuts_PreviewMouseMove"
- Style="{StaticResource LabelSty}" />
- <customControl:ListBoxEx x:Name="ListShortCuts" HorizontalAlignment="Stretch" Margin="0,8,0,0" MinWidth="540"
- Grid.Row="1"
- AllowDrop="True"
- BorderThickness="0"
- SizeChanged="ListBoxShortCuts_SizeChanged"
- DragOver="ListBoxShortCuts_DragOver"
- Drop="ListBoxShortCuts_Drop"
- ItemContainerStyle="{StaticResource ListBoxItemStyle}"
- ItemTemplate="{StaticResource DataTemplate}"
- ItemsPanel="{StaticResource ListItemsPanelTemplate}"
- PreviewMouseMove="ListBoxShortCuts_PreviewMouseMove"
- ScrollViewer.HorizontalScrollBarVisibility="Disabled"
- SelectionMode="Extended"
- Visibility="{Binding IsExpendTools,Converter={StaticResource InvertBoolToVisibleConvert}}"
- />
- <customControl:ListBoxEx x:Name="ListShortCutsExpend" HorizontalAlignment="Stretch" Margin="0,8,0,0" MinWidth="540"
- Grid.Row="1"
- AllowDrop="True"
- BorderThickness="0"
- SizeChanged="ListBoxShortCuts_SizeChanged"
- DragOver="ListBoxShortCuts_DragOver"
- Drop="ListBoxShortCuts_Drop"
- ItemContainerStyle="{StaticResource ListBoxItemStyle}"
- ItemTemplate="{StaticResource ExpendDataTemplate}"
- ItemsPanel="{StaticResource ListItemsPanelTemplate}"
- PreviewMouseMove="ListBoxShortCuts_PreviewMouseMove"
- ScrollViewer.HorizontalScrollBarVisibility="Disabled"
- SelectionMode="Extended"
- Visibility="{Binding IsExpendTools,Converter={StaticResource BoolToVisibilityConverter}}"
- />
- <StackPanel Grid.Row="2" Margin="0,16,0,16" AllowDrop="True"
- DragOver="ListBoxShortCuts_DragOver"
- Drop="ListBoxShortCuts_Drop"
- PreviewMouseMove="ListBoxMoreCuts_PreviewMouseMove"
- >
- <TextBlock Text="更多工具" FontSize="14" FontFamily="PingFang SC"/>
- </StackPanel>
- <Label Grid.Row="2" Visibility="Collapsed"
- AllowDrop="True"
- Content="更多工具"
- DragOver="ListBoxShortCuts_DragOver"
- Drop="ListBoxShortCuts_Drop"
- FontSize="20"
- PreviewMouseMove="ListBoxMoreCuts_PreviewMouseMove"
- Style="{StaticResource LabelSty}" />
- <customControl:ListBoxEx x:Name="ListMoreCuts" HorizontalAlignment="Stretch" MinWidth="540"
- Grid.Row="3"
- AllowDrop="True"
- BorderThickness="0"
- SizeChanged="ListBoxMoreCuts_SizeChanged"
- DragOver="ListBoxShortCuts_DragOver"
- ItemContainerStyle="{StaticResource MoreListBoxItemStyle}"
- ItemTemplate="{StaticResource DataTemplate}"
- ItemsPanel="{StaticResource ListItemsPanelTemplate}"
- PreviewMouseMove="ListBoxMoreCuts_PreviewMouseMove"
- ScrollViewer.HorizontalScrollBarVisibility="Disabled"
- SelectionMode="Extended"
- Visibility="{Binding IsExpendTools,Converter={StaticResource InvertBoolToVisibleConvert}}"
- />
-
-
- <customControl:ListBoxEx x:Name="ListMoreCutsExpend" HorizontalAlignment="Stretch" MinWidth="540"
- Grid.Row="3"
- AllowDrop="True"
- BorderThickness="0"
- SizeChanged="ListBoxMoreCuts_SizeChanged"
- DragOver="ListBoxShortCuts_DragOver"
- ItemContainerStyle="{StaticResource MoreListBoxItemStyle}"
- ItemTemplate="{StaticResource ExpendDataTemplate}"
- ItemsPanel="{StaticResource ListItemsPanelTemplate}"
- PreviewMouseMove="ListBoxMoreCuts_PreviewMouseMove"
- ScrollViewer.HorizontalScrollBarVisibility="Disabled"
- SelectionMode="Extended"
- Visibility="{Binding IsExpendTools,Converter={StaticResource BoolToVisibilityConverter}}"
- />
-
- <Image x:Name="sourceImage"
- Grid.RowSpan="4"
- Width="260"
- Height="80"
- HorizontalAlignment="Left"
- VerticalAlignment="Top"
- AllowDrop="True"
- IsHitTestVisible="False" />
- <Grid>
- <Image x:Name="moveImage"
- Grid.RowSpan="4"
- Width="260"
- Height="80"
- HorizontalAlignment="Left"
- VerticalAlignment="Top"
- IsHitTestVisible="False"
- Visibility="Hidden">
- <Image.RenderTransform>
- <TranslateTransform x:Name="tt"
- X="0"
- Y="0" />
- </Image.RenderTransform>
- </Image>
- </Grid>
- </Grid>
- </UserControl>
|