|
- <ResourceDictionary
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:con="clr-namespace:BeDesignerSCADA.Converters"
- xmlns:dxmvmm="clr-namespace:BeDesignerSCADA.Converters"
- xmlns:icon="http://metro.mahapps.com/winfx/xaml/iconpacks"
- xmlns:input="clr-namespace:System.Windows.Input;assembly=PresentationCore">
-
- <!--#region 主题笔刷-->
- <LinearGradientBrush x:Key="NormalBackground" StartPoint="0.5,0" EndPoint="0.5,1">
- <GradientStopCollection>
- <GradientStop Color="White" />
- <GradientStop Offset="0.5" Color="#D0D0D0" />
- <GradientStop Offset="1" Color="#E3E3E3" />
- </GradientStopCollection>
- </LinearGradientBrush>
-
- <SolidColorBrush x:Key="AccentBrush" Color="#2B79E2" />
- <SolidColorBrush x:Key="ControlBorderBrush" Color="LightGray" />
- <SolidColorBrush x:Key="ControlBackground" Color="White" />
- <SolidColorBrush x:Key="ControlForeground" Color="Black" />
- <!--#endregion-->
-
- <!--#region 转换器-->
- <con:HalfNumberConverter x:Key="HalfNumber" />
- <!--#endregion-->
-
- <!--#region 编辑模板-->
- <DataTemplate x:Key="EventEditTemplate">
- <DockPanel Height="24">
- <Button
- Margin="2"
- Command="{Binding DataContext.EditCommand, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=Window}}"
- CommandParameter="{Binding .}"
- Content="..."
- DockPanel.Dock="Right" />
- <TextBlock
- Margin="4,0,0,0"
- VerticalAlignment="Center"
- Text="{Binding Value}" />
- </DockPanel>
- </DataTemplate>
-
- <DataTemplate x:Key="ListEditTemplate">
- <DockPanel MaxHeight="100">
- <DockPanel DockPanel.Dock="Top">
- <Button
- Margin="2"
- Padding="2"
- Command="{Binding Value.AddCommand}"
- CommandParameter="{Binding ElementName=AddTxt, Path=Text}"
- DockPanel.Dock="Right">
- <icon:PackIconModern Kind="EditAdd" />
- </Button>
- <Button
- Margin="2"
- Padding="2"
- Command="{Binding Value.DeleteCommand}"
- CommandParameter="{Binding ElementName=list, Path=SelectedItem}"
- DockPanel.Dock="Right">
- <icon:PackIconModern Kind="Delete" />
- </Button>
- <TextBox x:Name="AddTxt" Margin="2" />
- </DockPanel>
-
- <ListBox
- x:Name="list"
- Margin="2"
- ItemsSource="{Binding Value}" />
- </DockPanel>
- </DataTemplate>
-
- <DataTemplate x:Key="ImagePathEditTemplate">
- <DockPanel>
- <Button
- Width="20"
- Height="20"
- Margin="2"
- Padding="0"
- Command="{Binding DataContext.SelectPathCommand, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=Window}}"
- CommandParameter="{Binding .}"
- Content="..."
- DockPanel.Dock="Right" />
- <TextBox
- x:Name="AddTxt"
- BorderThickness="0"
- DockPanel.Dock="Right"
- Text="{Binding Value}" />
- </DockPanel>
- </DataTemplate>
- <!--#endregion-->
-
- <!--#region 为某些获取焦点的控件设计设计时样式-->
- <Style x:Key="DesignComboBox" TargetType="ComboBox">
- <Setter Property="Focusable" Value="False" />
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="ComboBox">
- <Border BorderBrush="{StaticResource ControlBorderBrush}" BorderThickness="1">
- <Grid>
- <Grid.ColumnDefinitions>
- <ColumnDefinition />
- <ColumnDefinition Width="auto" />
- </Grid.ColumnDefinitions>
- <Border Background="{StaticResource ControlBackground}" />
- <Border
- Grid.Column="1"
- Background="{StaticResource ControlBackground}"
- BorderThickness="0"
- IsEnabled="False">
- <Path
- Margin="3"
- VerticalAlignment="Center"
- Data="M0,0 8,0 4,4z"
- Fill="{StaticResource ControlForeground}" />
- </Border>
- </Grid>
- </Border>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
-
- <!--<Style TargetType="Button" x:Key="DesignButton">
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="Button">
- <Border BorderThickness="1" BorderBrush="{StaticResource ControlBorderBrush}" Background="{StaticResource ControlBackground}">
- <TextBlock Text="{TemplateBinding Content}" FontSize="{TemplateBinding FontSize}"
- FontWeight="{TemplateBinding FontWeight}" HorizontalAlignment="Center" VerticalAlignment="Center"/>
- </Border>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>-->
-
- <Style x:Key="DesignToggleButton" TargetType="ToggleButton">
- <Setter Property="Foreground" Value="{StaticResource ControlForeground}" />
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="ToggleButton">
- <Border
- Background="{StaticResource NormalBackground}"
- BorderBrush="{StaticResource ControlBorderBrush}"
- BorderThickness="1"
- CornerRadius="2">
- <TextBlock
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- FontSize="{TemplateBinding FontSize}"
- FontWeight="{TemplateBinding FontWeight}"
- Text="{TemplateBinding Content}" />
- </Border>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
-
- <Style x:Key="ExecuteToggleButton" TargetType="ToggleButton">
- <Setter Property="Foreground" Value="{StaticResource ControlForeground}" />
- <Setter Property="Foreground" Value="{StaticResource ControlForeground}" />
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="ToggleButton">
- <Border
- x:Name="bd"
- Background="{StaticResource NormalBackground}"
- BorderBrush="{StaticResource ControlBorderBrush}"
- BorderThickness="1"
- CornerRadius="2">
- <TextBlock
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- FontSize="{TemplateBinding FontSize}"
- FontWeight="{TemplateBinding FontWeight}"
- Text="{TemplateBinding Content}" />
- </Border>
- <ControlTemplate.Triggers>
- <Trigger Property="IsChecked" Value="True">
- <Setter TargetName="bd" Property="Background">
- <Setter.Value>
- <LinearGradientBrush StartPoint="0.5,0" EndPoint="0.5,1">
- <GradientStopCollection>
- <GradientStop Color="#6AD456" />
- <GradientStop Offset="0.5" Color="#1DAE06" />
- <GradientStop Offset="1" Color="#8BDC7C" />
- </GradientStopCollection>
- </LinearGradientBrush>
- </Setter.Value>
- </Setter>
- </Trigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- <!--#endregion-->
-
- <!--#region 其他-->
- <DataTemplate x:Key="PageBoxStyle">
- <Button x:Name="dsd" Background="#4818659B" BorderBrush="Transparent" CommandParameter="{Binding .}" Command="{Binding DataContext.SelectPageCommand, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=UserControl}}">
- <Button.Template>
- <ControlTemplate>
- <Grid x:Name="mains" Margin="0">
- <Grid.RowDefinitions>
- <RowDefinition Height="auto"/>
- <RowDefinition Height="auto"/>
- </Grid.RowDefinitions>
- <Grid>
- <Grid.Background>
- <ImageBrush ImageSource="../Images/bj.png" Stretch="UniformToFill"/>
- </Grid.Background>
- </Grid>
- <Grid Grid.Row="1" Background="#010AA74D">
-
- </Grid>
- <Rectangle Height="100" Width="200" StrokeThickness="0">
- <Rectangle.Fill>
- <VisualBrush Visual="{Binding visual,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" />
- </Rectangle.Fill>
- </Rectangle>
- <StackPanel Grid.Row="1" Orientation="Horizontal">
- <icon:PackIconModern x:Name="Sort" Width="10" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="5,0,5,0" Foreground="White" Kind="Page" />
- <TextBlock Margin="5,0,0,0" Foreground="White" FontSize="12" HorizontalAlignment="Left"
- VerticalAlignment="Bottom"
- Text="{Binding Sort,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"></TextBlock>
- <TextBlock Foreground="White" FontSize="12" HorizontalAlignment="Left"
- VerticalAlignment="Bottom"
- Text="-"></TextBlock>
- <TextBlock Margin="0,0,0,0" FontSize="12" Foreground="White"
- x:Name="txt" Grid.Column="1" HorizontalAlignment="Left"
- VerticalAlignment="Bottom"
- Text="{Binding Name,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" />
- </StackPanel>
- <StackPanel x:Name="stack" Grid.Row="1" Orientation="Horizontal" HorizontalAlignment="Right" Margin="0,0,10,0">
- <Button Width="24" Cursor="Hand" BorderBrush="Transparent" Background="Transparent" CommandParameter="{Binding .}" Command="{Binding DataContext.AddPageCommand, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=UserControl}}" Padding="0" Margin="0,0,0,0" ToolTip="增加页">
- <icon:PackIconModern ToolTip="增加页" Width="10" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="White" Kind="Add" />
- </Button>
- <Button Width="24" Cursor="Hand" BorderBrush="Transparent" Background="Transparent" CommandParameter="{Binding .}" Command="{Binding DataContext.DeletePageCommand, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=UserControl}}" VerticalAlignment="Center" Padding="0" ToolTip="删除页">
- <icon:PackIconModern ToolTip="删除页" Width="10" HorizontalAlignment="Center" Foreground="White" Kind="Delete" />
- </Button>
- <Button Width="24" Cursor="Hand" BorderBrush="Transparent" Background="Transparent" CommandParameter="{Binding .}" Command="{Binding DataContext.ClearPageCommand, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=UserControl}}" VerticalAlignment="Center" Padding="0" ToolTip="清空页">
- <icon:PackIconModern ToolTip="清空页" Width="10" HorizontalAlignment="Center" Foreground="White" Kind="Clean" />
- </Button>
- </StackPanel>
- </Grid>
- <ControlTemplate.Triggers>
- <Trigger Property="IsMouseOver" Value="True">
- <Setter Property="Visibility" Value="Visible" TargetName="stack"></Setter>
- </Trigger>
- <Trigger Property="IsMouseOver" Value="false">
- <Setter Property="Visibility" Value="Collapsed" TargetName="stack"></Setter>
- </Trigger>
- <DataTrigger Binding="{Binding IsHome,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Value="True">
- <Setter TargetName="Sort" Property="Kind" Value="Home" />
- </DataTrigger>
- <DataTrigger Binding="{Binding IsHome,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Value="False">
- <Setter TargetName="Sort" Property="Kind" Value="Page" />
- </DataTrigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Button.Template>
- </Button>
-
-
- </DataTemplate>
-
- <DataTemplate x:Key="ToolBoxStyle">
- <Grid Margin="2" Background="Transparent">
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="30" />
- <ColumnDefinition />
- </Grid.ColumnDefinitions>
- <icon:PackIconMaterial
- x:Name="icon"
- Width="24"
- HorizontalAlignment="Stretch"
- VerticalAlignment="Stretch"
- BorderThickness="1"
- Kind="Ellipse" />
- <TextBlock
- x:Name="txt"
- Grid.Column="1"
- Margin="4"
- Text="{Binding Name}" />
- </Grid>
- <DataTemplate.Triggers>
- <DataTrigger Binding="{Binding Name}" Value="TheButton">
- <Setter TargetName="icon" Property="Kind" Value="GestureTapButton" />
- <Setter TargetName="txt" Property="Text" Value="按钮" />
- </DataTrigger>
- <DataTrigger Binding="{Binding Name}" Value="TheTimer">
- <Setter TargetName="icon" Property="Kind" Value="Timer" />
- <Setter TargetName="txt" Property="Text" Value="计时器" />
- </DataTrigger>
- <DataTrigger Binding="{Binding Name}" Value="TheCheckBox">
- <Setter TargetName="icon" Property="Kind" Value="CheckboxMarked" />
- <Setter TargetName="txt" Property="Text" Value="勾选框" />
- </DataTrigger>
- <DataTrigger Binding="{Binding Name}" Value="DigitalNumber">
- <Setter TargetName="icon" Property="Kind" Value="LedStrip" />
- <Setter TargetName="txt" Property="Text" Value="液晶数字" />
- </DataTrigger>
- <DataTrigger Binding="{Binding Name}" Value="TheComboBox">
- <Setter TargetName="icon" Property="Kind" Value="ViewList" />
- <Setter TargetName="txt" Property="Text" Value="下拉框" />
- </DataTrigger>
- <DataTrigger Binding="{Binding Name}" Value="TheImage">
- <Setter TargetName="icon" Property="Kind" Value="Image" />
- <Setter TargetName="txt" Property="Text" Value="图片" />
- </DataTrigger>
- <DataTrigger Binding="{Binding Name}" Value="TheTextBlock">
- <Setter TargetName="icon" Property="Kind" Value="TagText" />
- <Setter TargetName="txt" Property="Text" Value="文本块" />
- </DataTrigger>
- <DataTrigger Binding="{Binding Name}" Value="ArcGauge">
- <Setter TargetName="icon" Property="Kind" Value="Gauge" />
- <Setter TargetName="txt" Property="Text" Value="仪表盘" />
- </DataTrigger>
- <DataTrigger Binding="{Binding Name}" Value="StatusLight">
- <Setter TargetName="icon" Property="Kind" Value="CeilingLight" />
- <Setter TargetName="txt" Property="Text" Value="状态灯" />
- </DataTrigger>
- <DataTrigger Binding="{Binding Name}" Value="TheToggleButton">
- <Setter TargetName="icon" Property="Kind" Value="CheckOutline" />
- <Setter TargetName="txt" Property="Text" Value="开关按钮" />
- </DataTrigger>
- <DataTrigger Binding="{Binding Name}" Value="TheGroupBox">
- <Setter TargetName="icon" Property="Kind" Value="Group" />
- <Setter TargetName="txt" Property="Text" Value="分组" />
- </DataTrigger>
- <DataTrigger Binding="{Binding Name}" Value="TheTextBox">
- <Setter TargetName="icon" Property="Kind" Value="TextBox" />
- <Setter TargetName="txt" Property="Text" Value="文本框" />
- </DataTrigger>
- <DataTrigger Binding="{Binding Name}" Value="NumberBox">
- <Setter TargetName="icon" Property="Kind" Value="Numeric8Box" />
- <Setter TargetName="txt" Property="Text" Value="数值框" />
- </DataTrigger>
- <DataTrigger Binding="{Binding Name}" Value="GraphArrow">
- <Setter TargetName="icon" Property="Kind" Value="ArrowRightBold" />
- <Setter TargetName="txt" Property="Text" Value="箭头" />
- </DataTrigger>
- <DataTrigger Binding="{Binding Name}" Value="GraphStar">
- <Setter TargetName="icon" Property="Kind" Value="Star" />
- <Setter TargetName="txt" Property="Text" Value="五角星" />
- </DataTrigger>
- <DataTrigger Binding="{Binding Name}" Value="TheSlider">
- <Setter TargetName="icon" Property="Kind" Value="ArrowDownBold" />
- <Setter TargetName="txt" Property="Text" Value="滑块" />
- </DataTrigger>
- <DataTrigger Binding="{Binding Name}" Value="TheRadioButton">
- <Setter TargetName="icon" Property="Kind" Value="RadioboxMarked" />
- <Setter TargetName="txt" Property="Text" Value="单选按钮" />
- </DataTrigger>
-
- <DataTrigger Binding="{Binding Name}" Value="SwitchButton">
- <Setter TargetName="icon" Property="Kind" Value="ToggleSwitch" />
- <Setter TargetName="txt" Property="Text" Value="开关" />
- </DataTrigger>
- <DataTrigger Binding="{Binding Name}" Value="KnobButton">
- <Setter TargetName="icon" Property="Kind" Value="Ellipse" />
- <Setter TargetName="txt" Property="Text" Value="旋钮" />
- </DataTrigger>
- <DataTrigger Binding="{Binding Name}" Value="Silos">
- <Setter TargetName="icon" Property="Kind" Value="StoreSettings" />
- <Setter TargetName="txt" Property="Text" Value="物料仓" />
- </DataTrigger>
- <DataTrigger Binding="{Binding Name}" Value="NewConveyorBelt">
- <Setter TargetName="icon" Property="Kind" Value="Attachment" />
- <Setter TargetName="txt" Property="Text" Value="滚动线" />
- </DataTrigger>
- <DataTrigger Binding="{Binding Name}" Value="TheDataGrid">
- <Setter TargetName="icon" Property="Kind" Value="BorderAll" />
- <Setter TargetName="txt" Property="Text" Value="表格" />
- </DataTrigger>
- <DataTrigger Binding="{Binding Name}" Value="TheListBox">
- <Setter TargetName="icon" Property="Kind" Value="ViewHeadline" />
- <Setter TargetName="txt" Property="Text" Value="列表控件" />
- </DataTrigger>
- <DataTrigger Binding="{Binding Name}" Value="FYFTheListBox">
- <Setter TargetName="icon" Property="Kind" Value="ViewHeadline" />
- <Setter TargetName="txt" Property="Text" Value="列表控件-拖拽" />
- </DataTrigger>
- <DataTrigger Binding="{Binding Name}" Value="TheRedis">
- <Setter TargetName="icon" Property="Kind" Value="AlphaDBoxOutline" />
- <Setter TargetName="txt" Property="Text" Value="Redis控件" />
- </DataTrigger>
-
- <DataTrigger Binding="{Binding Name}" Value="WaveProgressBar">
- <Setter TargetName="icon" Property="Kind" Value="Wave" />
- <Setter TargetName="txt" Property="Text" Value="进度条波浪" />
- </DataTrigger>
-
- <DataTrigger Binding="{Binding Name}" Value="TheProgressBar">
- <Setter TargetName="icon" Property="Kind" Value="Texture" />
- <Setter TargetName="txt" Property="Text" Value="进度条正常" />
- </DataTrigger>
-
- <DataTrigger Binding="{Binding Name}" Value="TheRedProgressBar">
- <Setter TargetName="icon" Property="Kind" Value="CircleSlice5" />
- <Setter TargetName="txt" Property="Text" Value="进度条圆形红" />
- </DataTrigger>
-
- <DataTrigger Binding="{Binding Name}" Value="TheBlueProgressBar">
- <Setter TargetName="icon" Property="Kind" Value="CircleSlice5" />
- <Setter TargetName="txt" Property="Text" Value="进度条圆形蓝" />
- </DataTrigger>
-
- <DataTrigger Binding="{Binding Name}" Value="TheGreenProgressBar">
- <Setter TargetName="icon" Property="Kind" Value="CircleSlice5" />
- <Setter TargetName="txt" Property="Text" Value="进度条圆形绿" />
- </DataTrigger>
-
- <DataTrigger Binding="{Binding Name}" Value="TheAPI">
- <Setter TargetName="icon" Property="Kind" Value="AlphaABoxOutline" />
- <Setter TargetName="txt" Property="Text" Value="API接口" />
- </DataTrigger>
-
- <DataTrigger Binding="{Binding Name}" Value="TheMQTT">
- <Setter TargetName="icon" Property="Kind" Value="AlphaMBoxOutline" />
- <Setter TargetName="txt" Property="Text" Value="MQTT" />
- </DataTrigger>
-
- <DataTrigger Binding="{Binding Name}" Value="TheTabControl">
- <Setter TargetName="icon" Property="Kind" Value="PeriodicTable" />
- <Setter TargetName="txt" Property="Text" Value="选项卡控件" />
- </DataTrigger>
-
- <DataTrigger Binding="{Binding Name}" Value="TheCylinder">
- <Setter TargetName="icon" Property="Kind" Value="AlphaGCircleOutline" />
- <Setter TargetName="txt" Property="Text" Value="气缸控件" />
- </DataTrigger>
-
- <DataTrigger Binding="{Binding Name}" Value="TheRectangle">
- <Setter TargetName="icon" Property="Kind" Value="AlphaGCircleOutline" />
- <Setter TargetName="txt" Property="Text" Value="矩形" />
- </DataTrigger>
-
- <DataTrigger Binding="{Binding Name}" Value="TheEllipse">
- <Setter TargetName="icon" Property="Kind" Value="AlphaGCircleOutline" />
- <Setter TargetName="txt" Property="Text" Value="圆形" />
- </DataTrigger>
-
- <DataTrigger Binding="{Binding Name}" Value="TheWuLiaoControl">
- <Setter TargetName="icon" Property="Kind" Value="AlphaGCircleOutline" />
- <Setter TargetName="txt" Property="Text" Value="物料集合控件" />
- </DataTrigger>
-
- <DataTrigger Binding="{Binding Name}" Value="ThePopMessage">
- <Setter TargetName="icon" Property="Kind" Value="Message" />
- <Setter TargetName="txt" Property="Text" Value="消息弹窗" />
- </DataTrigger>
-
- <DataTrigger Binding="{Binding Name}" Value="TheMessage">
- <Setter TargetName="icon" Property="Kind" Value="Message" />
- <Setter TargetName="txt" Property="Text" Value="消息提示" />
- </DataTrigger>
-
- </DataTemplate.Triggers>
- </DataTemplate>
-
- <FontFamily x:Key="Digital">
- pack://application:,,,/Fonts/#DS-Digital
- </FontFamily>
- <!--#endregion-->
-
- <!--#region 右键菜单-->
- <ContextMenu
- x:Key="CanvasRightMenu"
- DataContext="{Binding PlacementTarget, RelativeSource={RelativeSource Self}}"
- FontFamily="Microsoft YaHei Ui">
- <MenuItem Command="{Binding CopySelectItemsCommand}" Header="复制">
- <MenuItem.Icon>
- <icon:PackIconModern
- Width="10"
- HorizontalAlignment="Center"
- Kind="PageCopy" />
- </MenuItem.Icon>
- </MenuItem>
- <MenuItem Command="{Binding PasteSelectItemsCommand}" Header="粘贴">
- <MenuItem.Icon>
- <icon:PackIconModern
- Width="10"
- HorizontalAlignment="Center"
- Kind="ClipboardPaste" />
- </MenuItem.Icon>
- </MenuItem>
- <MenuItem Command="{Binding DeleteSelectItemsCommand}" Header="删除">
- <MenuItem.Icon>
- <icon:PackIconModern
- Width="10"
- HorizontalAlignment="Center"
- Kind="Delete" />
- </MenuItem.Icon>
- </MenuItem>
- </ContextMenu>
-
- <ContextMenu
- x:Key="AdornerRightMenu"
- DataContext="{Binding PlacementTarget.Tag, RelativeSource={RelativeSource Mode=Self}}"
- FontFamily="Microsoft YaHei Ui">
- <MenuItem Command="{Binding CopySelectItemsCommand}" Header="复制">
- <MenuItem.Icon>
- <icon:PackIconModern
- Width="10"
- HorizontalAlignment="Center"
- Kind="PageCopy" />
- </MenuItem.Icon>
- </MenuItem>
- <MenuItem Command="{Binding PasteSelectItemsCommand}" Header="粘贴">
- <MenuItem.Icon>
- <icon:PackIconModern
- Width="10"
- HorizontalAlignment="Center"
- Kind="ClipboardPaste" />
- </MenuItem.Icon>
- </MenuItem>
- <MenuItem Command="{Binding DeleteSelectItemsCommand}" Header="删除">
- <MenuItem.Icon>
- <icon:PackIconModern
- Width="10"
- HorizontalAlignment="Center"
- Kind="Delete" />
- </MenuItem.Icon>
- </MenuItem>
- <MenuItem Command="{Binding SetTopLayerCommand}" Header="置于顶层">
- <MenuItem.Icon>
- <icon:PackIconMaterial
- Width="10"
- HorizontalAlignment="Center"
- Kind="ArrangeSendToBack" />
- </MenuItem.Icon>
- </MenuItem>
- <MenuItem Command="{Binding SetBottomLayerCommand}" Header="置于底层">
- <MenuItem.Icon>
- <icon:PackIconMaterial
- Width="10"
- HorizontalAlignment="Center"
- Kind="ArrangeBringToFront" />
- </MenuItem.Icon>
- </MenuItem>
- </ContextMenu>
-
- <!--#endregion-->
-
- <!--#region 控制集合-->
- <Style TargetType="{x:Type ToggleButton}">
- <Setter Property="Foreground" Value="White" />
- <Setter Property="FontFamily" Value="Microsoft YaHei" />
- <Setter Property="FontSize" Value="12" />
- <Setter Property="FontWeight" Value="Bold" />
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="ToggleButton">
- <Border
- BorderBrush="{TemplateBinding Control.BorderBrush}"
- BorderThickness="0"
- CornerRadius="2">
- <Border.Background>
- <LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
- <GradientStop Offset="0.0" Color="#FF71E0C6" />
- <GradientStop Offset="0.2" Color="#FF43A88D" />
- <GradientStop Offset="0.0" Color="#FF5BB07D" />
- </LinearGradientBrush>
- </Border.Background>
- <ContentPresenter
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- Content="{TemplateBinding ContentControl.Content}" />
- </Border>
- <ControlTemplate.Triggers>
-
- <Trigger Property="ButtonBase.IsPressed" Value="True">
- <Setter Property="UIElement.Effect">
- <Setter.Value>
- <DropShadowEffect
- BlurRadius="10"
- Direction="0"
- Opacity="0.9"
- RenderingBias="Performance"
- ShadowDepth="0"
- Color="#276AB0" />
- </Setter.Value>
- </Setter>
- <Setter Property="RenderTransform">
- <Setter.Value>
- <ScaleTransform ScaleX="0.9" ScaleY="0.9" />
- </Setter.Value>
- </Setter>
- <Setter Property="RenderTransformOrigin" Value=".5,.5" />
- </Trigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
-
- </Setter.Value>
- </Setter>
- </Style>
-
- <DataTemplate x:Key="Category">
- <TextBlock
- FontSize="20"
- Foreground="#4EB9E4"
- Text="{Binding}" />
- </DataTemplate>
- <!--#endregion-->
-
-
- </ResourceDictionary>
|