123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374 |
- <UserControl
- x:Class="PDF_Master.Views.PropertyPanel.ViewModular.ThemesContent"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:ViewModular="clr-namespace:PDF_Master.ViewModels.PropertyPanel.ViewModular"
- xmlns:convert="clr-namespace:PDF_Master.DataConvert"
- 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.ViewModular"
- xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:prism="http://prismlibrary.com/"
- Name="ThemesContentName"
- d:DataContext="{d:DesignInstance Type=ViewModular:ThemesContentViewModel}"
- d:DesignHeight="248"
- d:DesignWidth="235"
- Loaded="UserControl_Loaded"
- mc:Ignorable="d">
- <UserControl.Resources>
- <ResourceDictionary>
- <ResourceDictionary.MergedDictionaries>
- <ResourceDictionary Source="pack://application:,,,/Styles/RadioButtonStyle.xaml" />
- <ResourceDictionary Source="pack://application:,,,/Styles/ButtonStyle.xaml" />
- <ResourceDictionary Source="pack://application:,,,/Styles/TextBoxStyle.xaml" />
- </ResourceDictionary.MergedDictionaries>
- <convert:ObjectConvert x:Key="ObjectConvert" />
- <!-- 虚线边框 -->
- <DrawingBrush
- x:Key="StaticborderBrush"
- TileMode="Tile"
- Viewport="0,0,8,8"
- ViewportUnits="Absolute">
- <DrawingBrush.Drawing>
- <DrawingGroup>
- <GeometryDrawing Brush="#FFA0A2AE">
- <GeometryDrawing.Geometry>
- <GeometryGroup>
- <RectangleGeometry Rect="0,0,50,50" />
- <RectangleGeometry Rect="50,50,50,50" />
- </GeometryGroup>
- </GeometryDrawing.Geometry>
- </GeometryDrawing>
- </DrawingGroup>
- </DrawingBrush.Drawing>
- </DrawingBrush>
- <DrawingBrush
- x:Key="OverborderBrush"
- TileMode="Tile"
- Viewport="0,0,8,8"
- ViewportUnits="Absolute">
- <DrawingBrush.Drawing>
- <DrawingGroup>
- <GeometryDrawing Brush="#477EDE">
- <GeometryDrawing.Geometry>
- <GeometryGroup>
- <RectangleGeometry Rect="0,0,50,50" />
- <RectangleGeometry Rect="50,50,50,50" />
- </GeometryGroup>
- </GeometryDrawing.Geometry>
- </GeometryDrawing>
- </DrawingGroup>
- </DrawingBrush.Drawing>
- </DrawingBrush>
- <ContextMenu x:Key="radioButtonRightMenu">
- <ContextMenu.ItemContainerStyle>
- <Style TargetType="MenuItem">
- <Setter Property="Padding" Value="-28,7,-80,7" />
- <Setter Property="VerticalContentAlignment" Value="Center" />
- </Style>
- </ContextMenu.ItemContainerStyle>
- <MenuItem Click="MenuItem_Click">
- <MenuItem.Header>
- <StackPanel Orientation="Horizontal">
- <Path Data="M11,1 L11,3 L14,3 L14,4 L13,4 L13,15 L3,15 L3,4 L2,4 L2,3 L5,3 L5,1 L11,1 Z M12,4 L4,4 L4,14 L12,14 L12,4 Z M6,5 L6,13 L5,13 L5,5 L6,5 Z M8.5,5 L8.5,13 L7.5,13 L7.5,5 L8.5,5 Z M11,5 L11,13 L10,13 L10,5 L11,5 Z M10,2 L6,2 L6,3 L10,3 L10,2 Z" Fill="{StaticResource MenuIco.fill}" />
- <TextBlock Margin="10,0,0,0" Text="删除" />
- </StackPanel>
- </MenuItem.Header>
- </MenuItem>
- </ContextMenu>
- <Style
- x:Key="CustomBtnStyle"
- BasedOn="{StaticResource TitleBarBtn}"
- TargetType="{x:Type Button}">
- <Setter Property="Background" Value="Transparent" />
- <Setter Property="BorderBrush" Value="Transparent" />
- <Setter Property="Width" Value="auto" />
- <Setter Property="Height" Value="40" />
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type Button}">
- <Border
- x:Name="border"
- Background="{TemplateBinding Background}"
- BorderBrush="{StaticResource StaticborderBrush}"
- BorderThickness="{TemplateBinding BorderThickness}"
- SnapsToDevicePixels="true">
- <ContentPresenter
- x:Name="contentPresenter"
- Margin="{TemplateBinding Padding}"
- HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
- VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
- Focusable="False"
- RecognizesAccessKey="True"
- SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
- </Border>
- <ControlTemplate.Triggers>
- <Trigger Property="IsMouseOver" Value="true">
- <Setter TargetName="border" Property="Background" Value="Transparent" />
- <Setter TargetName="border" Property="BorderBrush" Value="{StaticResource OverborderBrush}" />
- </Trigger>
- <Trigger Property="IsPressed" Value="true">
- <Setter TargetName="border" Property="Background" Value="#C7D8F5" />
- <Setter TargetName="border" Property="BorderBrush" Value="{StaticResource OverborderBrush}" />
- </Trigger>
- <Trigger Property="IsEnabled" Value="false">
- <Setter TargetName="border" Property="Background" Value="Transparent" />
- <Setter TargetName="border" Property="BorderBrush" Value="#33000000" />
- <Setter TargetName="contentPresenter" Property="TextElement.Foreground" Value="#FF999999" />
- <Setter TargetName="contentPresenter" Property="Opacity" Value="0.4" />
- </Trigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- </ResourceDictionary>
- </UserControl.Resources>
- <WrapPanel Name="btnsPanel" Width="auto" Orientation="Horizontal">
- <RadioButton
- Name="RBtnLight"
- Margin="4,0,4,0"
- Click="RBtnDark_Click"
- GroupName="DrawMode"
- IsChecked="{Binding LightDrawMode}"
- Style="{StaticResource PageViewRadioBtn}">
- <StackPanel Margin="0,0,3,0">
- <Border
- Width="16"
- Height="16"
- Margin="0,0,0,8"
- BorderBrush="#E2E3E6"
- BorderThickness="1">
- <Rectangle
- Width="16"
- Height="16"
- Fill="White" />
- </Border>
- <TextBlock
- x:Name="LightText"
- Style="{StaticResource PagesView_txtContext}"
- Text="Light" />
- </StackPanel>
- </RadioButton>
- <RadioButton
- Name="RBtnSepia"
- Margin="4,0,4,0"
- Click="RBtnDark_Click"
- GroupName="DrawMode"
- IsChecked="{Binding SepiaDrawMode}"
- Style="{StaticResource PageViewRadioBtn}">
- <StackPanel Margin="0,0,3,0">
- <Border
- Width="16"
- Height="16"
- Margin="0,0,0,8"
- BorderBrush="#E2E3E6"
- BorderThickness="1">
- <Rectangle
- Width="16"
- Height="16"
- Fill="#FFEFB2" />
- </Border>
- <TextBlock
- x:Name="SepiaText"
- Style="{StaticResource PagesView_txtContext}"
- Text="Sepia" />
- </StackPanel>
- </RadioButton>
- <RadioButton
- Name="RBtnDark"
- Margin="4,0,4,0"
- Click="RBtnDark_Click"
- GroupName="DrawMode"
- IsChecked="{Binding DarkDrawMode}"
- Style="{StaticResource PageViewRadioBtn}">
- <StackPanel Margin="0,0,3,0">
- <Border
- Width="16"
- Height="16"
- Margin="0,0,0,8"
- BorderBrush="#E2E3E6"
- BorderThickness="1">
- <Rectangle
- Width="16"
- Height="16"
- Fill="Black" />
- </Border>
- <TextBlock
- x:Name="DarkText"
- Style="{StaticResource PagesView_txtContext}"
- Text="Dark" />
- </StackPanel>
- </RadioButton>
- <RadioButton
- Name="RBtnReseda"
- Margin="4,4,4,0"
- Click="RBtnDark_Click"
- GroupName="DrawMode"
- IsChecked="{Binding ResedaDrawMode}"
- Style="{StaticResource PageViewRadioBtn}">
- <StackPanel Margin="0,0,3,0">
- <Border
- Width="16"
- Height="16"
- Margin="0,0,0,8"
- BorderBrush="#E2E3E6"
- BorderThickness="1">
- <Rectangle
- Width="16"
- Height="16"
- Fill="#CBE9CE" />
- </Border>
- <TextBlock
- x:Name="ResedaText"
- Style="{StaticResource PagesView_txtContext}"
- Text="Reseda" />
- </StackPanel>
- </RadioButton>
- <RadioButton
- Name="RBtnThemes1"
- Margin="4,4,4,0"
- GroupName="DrawMode"
- Click="RBtnDark_Click"
- ContextMenu="{StaticResource radioButtonRightMenu}"
- IsVisibleChanged="RBtnThemes1_IsVisibleChanged"
- Style="{StaticResource PageViewRadioBtn}"
- Visibility="Collapsed">
- <StackPanel Margin="0,0,3,0">
- <Border
- Width="16"
- Height="16"
- Margin="0,0,0,8"
- BorderBrush="#E2E3E6"
- BorderThickness="1">
- <Rectangle
- Width="16"
- Height="16"
- Fill="#CBE9CE" />
- </Border>
- <TextBlock
- x:Name="Theme1Text"
- Style="{StaticResource PagesView_txtContext}"
- Text="Theme1" />
- </StackPanel>
- </RadioButton>
- <RadioButton
- Name="RBtnThemes2"
- Margin="4,4,4,0"
- GroupName="DrawMode"
- Click="RBtnDark_Click"
- ContextMenu="{StaticResource radioButtonRightMenu}"
- IsVisibleChanged="RBtnThemes1_IsVisibleChanged"
- Style="{StaticResource PageViewRadioBtn}"
- Visibility="Collapsed">
- <StackPanel Margin="0,0,3,0">
- <Border
- Width="16"
- Height="16"
- Margin="0,0,0,8"
- BorderBrush="#E2E3E6"
- BorderThickness="1">
- <Rectangle
- Width="16"
- Height="16"
- Fill="#CBE9CE" />
- </Border>
- <TextBlock
- x:Name="Theme2Text"
- Style="{StaticResource PagesView_txtContext}"
- Text="Theme2" />
- </StackPanel>
- </RadioButton>
- <RadioButton
- Name="RBtnThemes3"
- Margin="4,4,4,0"
- GroupName="DrawMode"
- Click="RBtnDark_Click"
- ContextMenu="{StaticResource radioButtonRightMenu}"
- IsVisibleChanged="RBtnThemes1_IsVisibleChanged"
- Style="{StaticResource PageViewRadioBtn}"
- Visibility="Collapsed">
- <StackPanel Margin="0,0,3,0">
- <Border
- Width="16"
- Height="16"
- Margin="0,0,0,8"
- BorderBrush="#E2E3E6"
- BorderThickness="1">
- <Rectangle
- Width="16"
- Height="16"
- Fill="#CBE9CE" />
- </Border>
- <TextBlock
- x:Name="Theme3Text"
- Style="{StaticResource PagesView_txtContext}"
- Text="Theme3" />
- </StackPanel>
- </RadioButton>
- <RadioButton
- Name="RBtnThemes4"
- Margin="4,4,4,0"
- GroupName="DrawMode"
- Click="RBtnDark_Click"
- ContextMenu="{StaticResource radioButtonRightMenu}"
- IsVisibleChanged="RBtnThemes1_IsVisibleChanged"
- Style="{StaticResource PageViewRadioBtn}"
- Visibility="Collapsed">
- <StackPanel Margin="0,0,3,0">
- <Border
- Width="16"
- Height="16"
- Margin="0,0,0,8"
- BorderBrush="#E2E3E6"
- BorderThickness="1">
- <Rectangle
- Width="16"
- Height="16"
- Fill="#CBE9CE" />
- </Border>
- <TextBlock
- x:Name="Theme4Text"
- Style="{StaticResource PagesView_txtContext}"
- Text="Theme4" />
- </StackPanel>
- </RadioButton>
- <Border
- Width="72"
- Height="80"
- Margin="4,4,4,0">
- <Button
- Name="RBtnCustom"
- Width="60"
- Height="60"
- BorderThickness="1"
- Click="RBtnCustom_Click"
- Style="{DynamicResource CustomBtnStyle}">
- <StackPanel>
- <Path
- Margin="0,0,0,8"
- HorizontalAlignment="Center"
- Data="M8.5,2.5 L8.5,7.5 L13.5,7.5 L13.5,8.5 L8.5,8.5 L8.5,13.5 L7.5,13.5 L7.5,8.5 L2.5,8.5 L2.5,7.5 L7.5,7.5 L7.5,2.5 L8.5,2.5 Z"
- Fill="{StaticResource MenuIco.fill}" />
- <TextBlock
- x:Name="CustomText"
- Style="{StaticResource PagesView_txtContext}"
- Text="Custom" />
- </StackPanel>
- </Button>
- </Border>
- </WrapPanel>
- <i:Interaction.Triggers>
- <i:EventTrigger EventName="Loaded">
- <prism:InvokeCommandAction Command="{Binding LoadedCommand}" CommandParameter="{Binding ElementName=btnsPanel}" />
- </i:EventTrigger>
- <!--<i:EventTrigger EventName="MouseDown">
- <prism:InvokeCommandAction Command="{Binding MouseDownCommand}" CommandParameter="{Binding}" />
- </i:EventTrigger>-->
- </i:Interaction.Triggers>
- </UserControl>
|