123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365 |
- <UserControl
- x:Class="PDF_Office.Views.HomePanel.PDFTools.QuickToolsContent"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:local="clr-namespace:PDF_Office.Views.HomePanel"
- xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:customControl="clr-namespace:PDF_Office.CustomControl"
- xmlns:Converter="clr-namespace:PDF_Office.DataConvert"
- xmlns:homePanel="clr-namespace:PDF_Office.Views.HomePanel"
- d:DesignHeight="450"
- d:DesignWidth="800"
- mc:Ignorable="d">
- <UserControl.Resources>
- <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>
- <Style x:Key="FocusVisual">
- <Setter Property="Control.Template">
- <Setter.Value>
- <ControlTemplate>
- <Rectangle Margin="0"
- SnapsToDevicePixels="true"
- Stroke="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"
- StrokeDashArray="1 2"
- StrokeThickness="0" />
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- <!-- set SelectedBackgroundColor to Transparent when you do not need the background in selected items -->
- <Color x:Key="SelectedBackgroundColor">LightBlue</Color>
- <Color x:Key="SelectedUnfocusedColor">AliceBlue</Color>
- <!-- set the MouseOverColor to Transparent when you do not need the effect in the unselected items -->
- <Color x:Key="MouseOverColor">LightBlue</Color>
- <SolidColorBrush x:Key="Item.MouseOver.Background"
- Color="LightBlue" />
- <SolidColorBrush x:Key="Item.MouseOver.Border"
- Color="LightBlue" />
- <SolidColorBrush x:Key="Item.SelectedInactive.Background"
- Color="AliceBlue" />
- <SolidColorBrush x:Key="Item.SelectedInactive.Border"
- Color="AliceBlue" />
- <SolidColorBrush x:Key="Item.SelectedActive.Background"
- Color="Beige" />
- <SolidColorBrush x:Key="Item.SelectedActive.Border"
- Color="Beige" />
- <Style x:Key="ListBoxItemStyle"
- TargetType="{x:Type customControl:ListItemQuickTool}">
- <Setter Property="SnapsToDevicePixels"
- Value="True" />
- <Setter Property="FocusVisualStyle"
- Value="{x:Null}" />
- <!-- 导致模块闪烁,并且时有时无
- <EventSetter Event="DragLeave"
- Handler="MyListBoxItem_DragLeave">
- </EventSetter>-->
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type customControl:ListItemQuickTool}">
- <!--Width="230" Margin="50,20,0,10"-->
- <Border x:Name="Border"
- Margin="0,0,0,30"
-
- Background="AliceBlue"
- SnapsToDevicePixels="true">
- <ContentPresenter />
- </Border>
- <ControlTemplate.Triggers>
- <MultiTrigger>
- <MultiTrigger.Conditions>
- <Condition Property="IsOverModular"
- Value="True" />
- </MultiTrigger.Conditions>
- <Setter TargetName="Border"
- Property="Background"
- Value="{StaticResource Item.MouseOver.Background}" />
- <Setter TargetName="Border"
- Property="BorderBrush"
- Value="{StaticResource Item.MouseOver.Border}" />
- </MultiTrigger>
- <!--<MultiTrigger>
- <MultiTrigger.Conditions>
- -->
- <!--<Condition Property="DragLeave"
- Value="True" />-->
- <!--
- <Condition Property="IsFilePicked"
- Value="False" />
- </MultiTrigger.Conditions>
- <Setter TargetName="Border"
- Property="Background"
- Value="AliceBlue" />
- <Setter TargetName="Border"
- Property="BorderBrush"
- Value="AliceBlue" />
- </MultiTrigger>-->
- <!--<MultiTrigger>
- <MultiTrigger.Conditions>
- <Condition Property="IsMouseOver"
- Value="True" />
- </MultiTrigger.Conditions>
- <Setter TargetName="Border"
- Property="Background"
- Value="{StaticResource Item.MouseOver.Background}" />
- <Setter TargetName="Border"
- Property="BorderBrush"
- Value="{StaticResource Item.MouseOver.Border}" />
- </MultiTrigger>-->
- <!--<MultiTrigger>
- <MultiTrigger.Conditions>
- <Condition Property="Selector.IsSelectionActive"
- Value="False" />
- <Condition Property="IsSelected"
- Value="True" />
- </MultiTrigger.Conditions>
- <Setter TargetName="Border"
- Property="Background"
- Value="{StaticResource Item.SelectedInactive.Background}" />
- <Setter TargetName="Border"
- Property="BorderBrush"
- Value="{StaticResource Item.SelectedInactive.Border}" />
- </MultiTrigger>
- <MultiTrigger>
- <MultiTrigger.Conditions>
- <Condition Property="Selector.IsSelectionActive"
- Value="True" />
- <Condition Property="IsSelected"
- Value="True" />
- </MultiTrigger.Conditions>
- <Setter TargetName="Border"
- Property="Background"
- Value="{StaticResource Item.SelectedActive.Background}" />
- <Setter TargetName="Border"
- Property="BorderBrush"
- Value="{StaticResource Item.SelectedActive.Border}" />
- </MultiTrigger>
- <Trigger Property="IsEnabled"
- Value="False">
- <Setter TargetName="Border"
- Property="TextElement.Foreground"
- Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
- </Trigger>-->
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- <Style.Triggers />
- </Style>
- <Style x:Key="MoreListBoxItemStyle"
- TargetType="{x:Type customControl:ListItemQuickTool}">
- <Setter Property="SnapsToDevicePixels"
- Value="True" />
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type customControl:ListItemQuickTool}">
- <Border x:Name="Border" Margin="0,0,0,0"
- Background="LightGray"
- SnapsToDevicePixels="False">
- <ContentPresenter />
- </Border>
- <ControlTemplate.Triggers>
- <MultiTrigger>
- <MultiTrigger.Conditions>
- <Condition Property="IsSelected"
- Value="true" />
- </MultiTrigger.Conditions>
- <MultiTrigger.Setters>
- <Setter TargetName="Border"
- Property="Background"
- Value="LightGoldenrodYellow" />
- </MultiTrigger.Setters>
- </MultiTrigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- <Converter:BoolToVisible x:Key="BoolToVisibilityConverter" />
- <DataTemplate x:Key="DataTemplate">
- <homePanel:HomeToolItem x:Name="data"/>
- </DataTemplate>
- <ItemsPanelTemplate x:Key="ListItemsPanelTemplate">
- <WrapPanel AllowDrop="True"
- Orientation="Horizontal" />
- </ItemsPanelTemplate>
- </UserControl.Resources>
- <Grid Grid.ColumnSpan="2" Margin="0,0,20,0">
- <Grid.RowDefinitions>
- <RowDefinition Height="Auto"/>
- <RowDefinition Height="*"/>
- </Grid.RowDefinitions>
- <TextBlock
- x:Name="TxbQuickToolsTitle"
- Margin="0,0,0,16"
- FontSize="24"
- FontWeight="SemiBold"
- Text="Quick Tools" />
- <StackPanel
- x:Name="PnlToolsUIBtns" Grid.ColumnSpan="2"
- Grid.Column="0"
- Margin="0,0,12,0"
- HorizontalAlignment="Right"
- VerticalAlignment="Top"
- Orientation="Horizontal"
- Visibility="Visible">
- <Button
- x:Name="BtnTools"
- Width="68"
- Height="28"
- Margin="0,0,0,0"
- Background="#FFFFFF"
- Content="Tools"
- Click="BtnTools_Click"
- >
- </Button>
- <Button
- x:Name="BtnMore"
- Width="28"
- Height="28"
- Margin="12,0,0,0"
- Background="#FFFFFF" BorderThickness="0" Content="..."
- Click="BtnMore_Click"
- >
- </Button>
- </StackPanel>
- <Grid
- x:Name="GridAllTools"
- Grid.Row="1" Height="270"
- SizeChanged="GridAllTools_SizeChanged">
- <customControl:ListBoxEx x:Name="ListBoxToolBars" HorizontalAlignment="Stretch" MinWidth="540"
- Grid.Row="3"
- AllowDrop="True"
- BorderThickness="0"
- SizeChanged="ListBoxShortCuts_SizeChanged"
- ItemContainerStyle="{StaticResource MoreListBoxItemStyle}"
- ItemTemplate="{StaticResource DataTemplate}"
- ItemsPanel="{StaticResource ListItemsPanelTemplate}"
- ScrollViewer.HorizontalScrollBarVisibility="Disabled"
- SelectionMode="Single" />
- <!--<WrapPanel Visibility="Collapsed"
- x:Name="Pnlwrap"
- MinWidth="230"
- HorizontalAlignment="Left"
- IsEnabled="True">
- <local:HomeToolItem x:Name="ToolItemBatch"
- IconHoverPath="pack://application:,,,/Resources/QuickToolIcon/Batch.png"
- IconPath="pack://application:,,,/Resources/QuickToolIcon/Batch.png"
- ToolInfo="Batch convert, compress, secure, watermark PDFs."
- ToolTitile="Batch" />
- <local:HomeToolItem x:Name="ToolItemOCR"
- IconHoverPath="pack://application:,,,/Resources/QuickToolIcon/Batch.png"
- IconPath="pack://application:,,,/Resources/QuickToolIcon/Batch.png"
- ToolInfo="Convert PDFs to Word/ HTML/ TXT/ JPEG/ PNG files."
- ToolTitile="OCR" />
- <local:HomeToolItem x:Name="ToolItemConvertPDF"
- IconHoverPath="pack://application:,,,/Resources/QuickToolIcon/Batch.png"
- IconPath="pack://application:,,,/Resources/QuickToolIcon/Batch.png"
- ToolInfo="Protect PDFs with image/ text watermarks from plagiarism."
- ToolTitile="Convert PDF" />
- <local:HomeToolItem x:Name="ToolItemImageToPDF"
- IconHoverPath="pack://application:,,,/Resources/QuickToolIcon/Batch.png"
- IconPath="pack://application:,,,/Resources/QuickToolIcon/Batch.png"
- ToolInfo="Protect PDFs with image/ text watermarks from plagiarism."
- ToolTitile="Image To PDF" />
- <local:HomeToolItem x:Name="ToolItemMergePDF"
- IconHoverPath="pack://application:,,,/Resources/QuickToolIcon/Batch.png"
- IconPath="pack://application:,,,/Resources/QuickToolIcon/Batch.png"
- ToolInfo="Protect PDFs with image/ text watermarks from plagiarism."
- ToolTitile="Merge PDF"
- />
- <local:HomeToolItem x:Name="ToolItemCompressPDF"
- IconHoverPath="pack://application:,,,/Resources/QuickToolIcon/Batch.png"
- IconPath="pack://application:,,,/Resources/QuickToolIcon/Batch.png"
- ToolInfo="Convert JPEG/ JPG/ PNG/ TIFF/ BMP/ PSD files to PDFs."
- ToolTitile="Compress PDF" />
- <local:HomeToolItem x:Name="ToolItemSecurity"
- IconHoverPath="pack://application:,,,/Resources/QuickToolIcon/Batch.png"
- IconPath="pack://application:,,,/Resources/QuickToolIcon/Batch.png"
- ToolInfo="Convert PDFs to Word, Fonts formatting get converted."
- ToolTitile="Security" />
- <local:HomeToolItem x:Name="ToolItem1"
- IconHoverPath="pack://application:,,,/Resources/QuickToolIcon/Batch.png"
- IconPath="pack://application:,,,/Resources/QuickToolIcon/Batch.png"
- ToolInfo="QuickTools_ToolMergeInfo"
- ToolTitile="QuickTools_ToolMerge" />
- <local:HomeToolItem x:Name="ToolItem2"
- IconHoverPath="pack://application:,,,/Resources/QuickToolIcon/Batch.png"
- IconPath="pack://application:,,,/Resources/QuickToolIcon/Batch.png"
- ToolInfo="Protect PDFs with image/ text watermarks from plagiarism."
- ToolTitile="Compare PDF" />
- <local:HomeToolItem x:Name="ToolItem3"
- IconHoverPath="pack://application:,,,/Resources/QuickToolIcon/Batch.png"
- IconPath="pack://application:,,,/Resources/QuickToolIcon/Batch.png"
- ToolInfo="Protect PDFs with image/ text watermarks from plagiarism."
- ToolTitile="QuickTools_ToolImageToPDF"
- Visibility="Collapsed" />
- <local:HomeToolItem x:Name="ToolItem4"
- IconHoverPath="pack://application:,,,/Resources/QuickToolIcon/Batch.png"
- IconPath="pack://application:,,,/Resources/QuickToolIcon/Batch.png"
- ToolInfo="QuickTools_ToolSecurityInfo"
- ToolTitile="QuickTools_ToolSecurity"
- Visibility="Collapsed" />
- <local:HomeToolItem x:Name="ToolItem5"
- IconHoverPath="pack://application:,,,/Resources/QuickToolIcon/Batch.png"
- IconPath="pack://application:,,,/Resources/QuickToolIcon/Batch.png"
- ToolInfo="QuickTools_ToolWatermarkInfo"
- ToolTitile="QuickTools_ToolWatermark"
- Visibility="Visible" />
- <local:HomeToolItem x:Name="ToolItem6"
- IconHoverPath="pack://application:,,,/Resources/QuickToolIcon/Batch.png"
- IconPath="pack://application:,,,/Resources/QuickToolIcon/Batch.png"
- ToolInfo="QuickTools_ToolHeaderFooterInfo"
- ToolTitile="QuickTools_ToolHeaderFooter"
- Visibility="Visible" />
- <local:HomeToolItem x:Name="ToolItem7"
- IconHoverPath="pack://application:,,,/Resources/QuickToolIcon/Batch.png"
- IconPath="pack://application:,,,/Resources/QuickToolIcon/Batch.png"
- ToolInfo="QuickTools_ToolBatesInfo"
- ToolTitile="QuickTools_ToolBates"
- Visibility="Visible" />
- </WrapPanel>-->
- </Grid>
- </Grid>
- </UserControl>
|