123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149 |
- <UserControl
- x:Class="PDF_Master.Views.HomePanel.PDFTools.QuickToolsContent"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:controls="clr-namespace:WpfToolkit.Controls;assembly=VirtualizingWrapPanel"
- xmlns:converter="clr-namespace:PDF_Master.DataConvert"
- xmlns:customControl="clr-namespace:PDF_Master.CustomControl"
- xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:local="clr-namespace:PDF_Master.Views.HomePanel"
- xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:pDFTools="clr-namespace:PDF_Master.Views.HomePanel.PDFTools"
- xmlns:pdftools="clr-namespace:PDF_Master.ViewModels.HomePanel.PDFTools"
- xmlns:prism="http://prismlibrary.com/"
- d:DataContext="{d:DesignInstance Type=pdftools:QuickToolsContentViewModel}"
- d:DesignHeight="450"
- d:DesignWidth="800"
- prism:ViewModelLocator.AutoWireViewModel="True"
- Loaded="UserControl_Loaded"
- mc:Ignorable="d">
- <UserControl.Resources>
- <ResourceDictionary>
- <ResourceDictionary.MergedDictionaries>
- <ResourceDictionary Source="../../../Styles/CustomListItemStyle.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">
- <pDFTools:PDFToolItem x:Name="data" Cursor="Hand" />
- </DataTemplate>
- <DataTemplate x:Key="ExpendDataTemplate">
- <pDFTools:PDFToolExpendItem x:Name="Expenddata" Cursor="Hand" />
- </DataTemplate>
- <ItemsPanelTemplate x:Key="ListItemsPanelTemplate">
- <controls:VirtualizingWrapPanel />
- </ItemsPanelTemplate>
- <Style
- x:Key="QuickToolsListBoxItemStyle"
- BasedOn="{StaticResource ListBoxItemStyle}"
- TargetType="{x:Type customControl:ListItemQuickTool}">
- <EventSetter Event="PreviewMouseLeftButtonUp" Handler="QuickTools_Click" />
- <Setter Property="Margin" Value="8,0" />
- <Setter Property="Width" Value="218" />
- </Style>
- </ResourceDictionary>
- </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,2,0,2"
- FontFamily="Segoe UI"
- FontSize="20"
- FontWeight="SemiBold"
- LineHeight="28"
- Text="{Binding T_Title}" />
- <StackPanel
- x:Name="PnlToolsUIBtns"
- Grid.Column="0"
- Grid.ColumnSpan="2"
- Margin="0,0,12,0"
- HorizontalAlignment="Right"
- VerticalAlignment="Center"
- Orientation="Horizontal"
- Visibility="Visible">
- <Button
- x:Name="BtnTools"
- Width="68"
- Height="28"
- Margin="0,0,0,0"
- Command="{Binding ShowToolCommand}"
- Content="Tools"
- Visibility="Collapsed" />
- <Button
- x:Name="BtnMore"
- Width="32"
- Height="32"
- Margin="12,0,0,16"
- Command="{Binding OpenMenuCommand}"
- CommandParameter="{Binding ElementName=BtnMore}"
- Style="{StaticResource btn.sec}">
- <Path
- Width="32"
- Height="32"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- Data="M12 16C12 16.8284 11.3284 17.5 10.5 17.5C9.67157 17.5 9 16.8284 9 16C9 15.1716 9.67157 14.5 10.5 14.5C11.3284 14.5 12 15.1716 12 16ZM17.3999 16C17.3999 16.8284 16.7283 17.5 15.8999 17.5C15.0715 17.5 14.3999 16.8284 14.3999 16C14.3999 15.1716 15.0715 14.5 15.8999 14.5C16.7283 14.5 17.3999 15.1716 17.3999 16ZM21.5 17.5C22.3284 17.5 23 16.8284 23 16C23 15.1716 22.3284 14.5 21.5 14.5C20.6716 14.5 20 15.1716 20 16C20 16.8284 20.6716 17.5 21.5 17.5Z"
- Fill="{StaticResource color.icon.base.neutral.norm.lv1}" />
- </Button>
- </StackPanel>
- <Grid
- x:Name="GridAllTools"
- Grid.Row="1"
- Height="270"
- Margin="0,0,12,0"
- SizeChanged="GridAllTools_SizeChanged">
- <customControl:ListBoxEx
- x:Name="ListBoxExpendToolBars"
- Grid.Row="3"
- MinWidth="250"
- HorizontalAlignment="Stretch"
- AllowDrop="True"
- Background="Transparent"
- BorderThickness="0"
- ItemContainerStyle="{StaticResource QuickToolsListBoxItemStyle}"
- ItemTemplate="{StaticResource ExpendDataTemplate}"
- ItemsPanel="{StaticResource ListItemsPanelTemplate}"
- ScrollViewer.HorizontalScrollBarVisibility="Disabled"
- ScrollViewer.VerticalScrollBarVisibility="Auto"
- SelectionMode="Single"
- Visibility="{Binding IsExpendTools, Converter={StaticResource BoolToVisibilityConverter}}" />
- <customControl:ListBoxEx
- x:Name="ListBoxToolBars"
- Grid.Row="3"
- MinWidth="250"
- AllowDrop="True"
- Background="Transparent"
- BorderThickness="0"
- ItemContainerStyle="{StaticResource QuickToolsListBoxItemStyle}"
- ItemTemplate="{StaticResource DataTemplate}"
- ItemsPanel="{StaticResource ListItemsPanelTemplate}"
- ScrollViewer.HorizontalScrollBarVisibility="Disabled"
- ScrollViewer.VerticalScrollBarVisibility="Auto"
- SelectionMode="Single"
- Visibility="{Binding IsExpendTools, Converter={StaticResource InvertBoolToVisibleConvert}}" />
- </Grid>
- </Grid>
- </UserControl>
|