|
|
@@ -19,86 +19,233 @@ |
|
|
|
<ResourceDictionary Source="/BPASmartClient.SCADAControl;component/Themes/Generic.xaml" /> |
|
|
|
|
|
|
|
</ResourceDictionary.MergedDictionaries> |
|
|
|
<Style x:Key="TheTabItem1" TargetType="{x:Type TabItem}"> |
|
|
|
<Setter Property="FocusVisualStyle" Value="{StaticResource TabItemFocusVisual}" /> |
|
|
|
<Setter Property="Padding" Value="6,1,6,1" /> |
|
|
|
<!--#region Menu--> |
|
|
|
<SolidColorBrush x:Key="Menu.Static.Background" Color="#FFF0F0F0" /> |
|
|
|
<SolidColorBrush x:Key="Expander.Static.Circle.Stroke" Color="#FF333333" /> |
|
|
|
<SolidColorBrush x:Key="Expander.Static.Circle.Fill" Color="#FFFFFFFF" /> |
|
|
|
<SolidColorBrush x:Key="Expander.Static.Arrow.Stroke" Color="#FF333333" /> |
|
|
|
<SolidColorBrush x:Key="Expander.MouseOver.Circle.Stroke" Color="#FF5593FF" /> |
|
|
|
<SolidColorBrush x:Key="Expander.MouseOver.Circle.Fill" Color="#FFF3F9FF" /> |
|
|
|
<SolidColorBrush x:Key="Expander.MouseOver.Arrow.Stroke" Color="#FF000000" /> |
|
|
|
<SolidColorBrush x:Key="Expander.Pressed.Circle.Stroke" Color="#FF3C77DD" /> |
|
|
|
<SolidColorBrush x:Key="Expander.Pressed.Circle.Fill" Color="#FFD9ECFF" /> |
|
|
|
<SolidColorBrush x:Key="Expander.Pressed.Arrow.Stroke" Color="#FF000000" /> |
|
|
|
<SolidColorBrush x:Key="Expander.Disabled.Circle.Stroke" Color="#FFBCBCBC" /> |
|
|
|
<SolidColorBrush x:Key="Expander.Disabled.Circle.Fill" Color="#FFE6E6E6" /> |
|
|
|
<SolidColorBrush x:Key="Expander.Disabled.Arrow.Stroke" Color="#FF707070" /> |
|
|
|
<Style x:Key="ExpanderHeaderFocusVisual"> |
|
|
|
<Setter Property="Control.Template"> |
|
|
|
<Setter.Value> |
|
|
|
<ControlTemplate> |
|
|
|
<Border> |
|
|
|
<Rectangle |
|
|
|
Margin="0" |
|
|
|
SnapsToDevicePixels="true" |
|
|
|
Stroke="Black" |
|
|
|
StrokeDashArray="1 2" |
|
|
|
StrokeThickness="1" /> |
|
|
|
</Border> |
|
|
|
</ControlTemplate> |
|
|
|
</Setter.Value> |
|
|
|
</Setter> |
|
|
|
</Style> |
|
|
|
<Style x:Key="ExpanderDownHeaderStyle" TargetType="{x:Type ToggleButton}"> |
|
|
|
<Setter Property="Template"> |
|
|
|
<Setter.Value> |
|
|
|
<ControlTemplate TargetType="{x:Type ToggleButton}"> |
|
|
|
<Border Padding="{TemplateBinding Padding}" Cursor="Hand"> |
|
|
|
<Grid |
|
|
|
Height="25" |
|
|
|
Margin="5" |
|
|
|
SnapsToDevicePixels="False"> |
|
|
|
<Grid.Background> |
|
|
|
<ImageBrush ImageSource="../Images/Exp.png" /> |
|
|
|
</Grid.Background> |
|
|
|
<Grid.ColumnDefinitions> |
|
|
|
<ColumnDefinition Width="10" /> |
|
|
|
<ColumnDefinition Width="*" /> |
|
|
|
</Grid.ColumnDefinitions> |
|
|
|
<Ellipse |
|
|
|
x:Name="circle" |
|
|
|
Width="19" |
|
|
|
Height="19" |
|
|
|
HorizontalAlignment="Center" |
|
|
|
VerticalAlignment="Center" |
|
|
|
Fill="{StaticResource Expander.Static.Circle.Fill}" |
|
|
|
Stroke="{StaticResource Expander.Static.Circle.Stroke}" |
|
|
|
Visibility="Collapsed" /> |
|
|
|
<Path |
|
|
|
x:Name="arrow" |
|
|
|
HorizontalAlignment="Center" |
|
|
|
VerticalAlignment="Center" |
|
|
|
Data="M 1,1.5 L 4.5,5 L 8,1.5" |
|
|
|
SnapsToDevicePixels="false" |
|
|
|
Stroke="{StaticResource Expander.Static.Arrow.Stroke}" |
|
|
|
StrokeThickness="2" |
|
|
|
Visibility="Collapsed" /> |
|
|
|
<ContentPresenter |
|
|
|
Grid.Column="1" |
|
|
|
Margin="4,0,0,0" |
|
|
|
HorizontalAlignment="Left" |
|
|
|
VerticalAlignment="Center" |
|
|
|
RecognizesAccessKey="True" |
|
|
|
SnapsToDevicePixels="True" /> |
|
|
|
</Grid> |
|
|
|
</Border> |
|
|
|
<ControlTemplate.Triggers> |
|
|
|
<Trigger Property="IsChecked" Value="true"> |
|
|
|
<Setter TargetName="arrow" Property="Data" Value="M 1,4.5 L 4.5,1 L 8,4.5" /> |
|
|
|
</Trigger> |
|
|
|
<Trigger Property="IsMouseOver" Value="true"> |
|
|
|
<Setter TargetName="circle" Property="Stroke" Value="{StaticResource Expander.MouseOver.Circle.Stroke}" /> |
|
|
|
<Setter TargetName="circle" Property="Fill" Value="{StaticResource Expander.MouseOver.Circle.Fill}" /> |
|
|
|
<Setter TargetName="arrow" Property="Stroke" Value="{StaticResource Expander.MouseOver.Arrow.Stroke}" /> |
|
|
|
</Trigger> |
|
|
|
<Trigger Property="IsPressed" Value="true"> |
|
|
|
<Setter TargetName="circle" Property="Stroke" Value="{StaticResource Expander.Pressed.Circle.Stroke}" /> |
|
|
|
<Setter TargetName="circle" Property="StrokeThickness" Value="1.5" /> |
|
|
|
<Setter TargetName="circle" Property="Fill" Value="{StaticResource Expander.Pressed.Circle.Fill}" /> |
|
|
|
<Setter TargetName="arrow" Property="Stroke" Value="{StaticResource Expander.Pressed.Arrow.Stroke}" /> |
|
|
|
</Trigger> |
|
|
|
<Trigger Property="IsEnabled" Value="false"> |
|
|
|
<Setter TargetName="circle" Property="Stroke" Value="{StaticResource Expander.Disabled.Circle.Stroke}" /> |
|
|
|
<Setter TargetName="circle" Property="Fill" Value="{StaticResource Expander.Disabled.Circle.Fill}" /> |
|
|
|
<Setter TargetName="arrow" Property="Stroke" Value="{StaticResource Expander.Disabled.Arrow.Stroke}" /> |
|
|
|
</Trigger> |
|
|
|
</ControlTemplate.Triggers> |
|
|
|
</ControlTemplate> |
|
|
|
</Setter.Value> |
|
|
|
</Setter> |
|
|
|
</Style> |
|
|
|
|
|
|
|
<Style x:Key="expang_1" TargetType="{x:Type Expander}"> |
|
|
|
<Setter Property="Foreground" Value="#FF5593FF" /> |
|
|
|
<Setter Property="FontSize" Value="16" /> |
|
|
|
<Setter Property="Background" Value="Transparent" /> |
|
|
|
<Setter Property="HorizontalContentAlignment" Value="Stretch" /> |
|
|
|
<Setter Property="VerticalContentAlignment" Value="Stretch" /> |
|
|
|
<Setter Property="Cursor" Value="Hand" /> |
|
|
|
<Setter Property="BorderBrush" Value="Transparent" /> |
|
|
|
<Setter Property="BorderThickness" Value="1" /> |
|
|
|
<Setter Property="Template"> |
|
|
|
<Setter.Value> |
|
|
|
<ControlTemplate TargetType="{x:Type TabItem}"> |
|
|
|
<ControlTemplate TargetType="{x:Type Expander}"> |
|
|
|
<Border |
|
|
|
x:Name="Bd" |
|
|
|
Margin="5" |
|
|
|
Padding="{TemplateBinding Padding}" |
|
|
|
Background="{TemplateBinding Background}" |
|
|
|
BorderBrush="{TemplateBinding BorderBrush}" |
|
|
|
BorderThickness="{TemplateBinding BorderThickness}" |
|
|
|
CornerRadius="0"> |
|
|
|
<ContentPresenter x:Name="Content" HorizontalAlignment="{Binding HorizontalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}" |
|
|
|
VerticalAlignment="{Binding VerticalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}" |
|
|
|
ContentSource="Header" |
|
|
|
Cursor="Hand" |
|
|
|
Margin="0,10,0,10" |
|
|
|
RecognizesAccessKey="True" |
|
|
|
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" > |
|
|
|
<ContentPresenter.LayoutTransform> |
|
|
|
<RotateTransform Angle="90" /> |
|
|
|
</ContentPresenter.LayoutTransform> |
|
|
|
|
|
|
|
</ContentPresenter> |
|
|
|
CornerRadius="3" |
|
|
|
SnapsToDevicePixels="true"> |
|
|
|
<DockPanel> |
|
|
|
<ToggleButton |
|
|
|
x:Name="HeaderSite" |
|
|
|
MinWidth="0" |
|
|
|
MinHeight="0" |
|
|
|
Margin="1" |
|
|
|
Padding="{TemplateBinding Padding}" |
|
|
|
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" |
|
|
|
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" |
|
|
|
Content="{TemplateBinding Header}" |
|
|
|
ContentTemplate="{TemplateBinding HeaderTemplate}" |
|
|
|
ContentTemplateSelector="{TemplateBinding HeaderTemplateSelector}" |
|
|
|
DockPanel.Dock="Top" |
|
|
|
FocusVisualStyle="{StaticResource ExpanderHeaderFocusVisual}" |
|
|
|
FontFamily="{TemplateBinding FontFamily}" |
|
|
|
FontSize="{TemplateBinding FontSize}" |
|
|
|
FontStretch="{TemplateBinding FontStretch}" |
|
|
|
FontStyle="{TemplateBinding FontStyle}" |
|
|
|
FontWeight="{TemplateBinding FontWeight}" |
|
|
|
Foreground="{TemplateBinding Foreground}" |
|
|
|
IsChecked="{Binding IsExpanded, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" |
|
|
|
Style="{StaticResource ExpanderDownHeaderStyle}" /> |
|
|
|
<ContentPresenter |
|
|
|
x:Name="ExpandSite" |
|
|
|
Margin="{TemplateBinding Padding}" |
|
|
|
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" |
|
|
|
VerticalAlignment="{TemplateBinding VerticalContentAlignment}" |
|
|
|
DockPanel.Dock="Bottom" |
|
|
|
Focusable="false" |
|
|
|
Visibility="Collapsed" /> |
|
|
|
</DockPanel> |
|
|
|
</Border> |
|
|
|
<ControlTemplate.Triggers> |
|
|
|
<Trigger Property="IsSelected" Value="true"> |
|
|
|
<Setter Property="Foreground" Value="#FFC1A800" /> |
|
|
|
<Setter Property="FontSize" Value="14" /> |
|
|
|
<Setter TargetName="Bd" Property="Background" Value="#FF1E535D"/> |
|
|
|
<Setter TargetName="Bd" Property="BorderBrush" Value="#FF707070"/> |
|
|
|
<Setter TargetName="Bd" Property="BorderThickness" Value="1"/> |
|
|
|
<Trigger Property="IsExpanded" Value="true"> |
|
|
|
<Setter TargetName="ExpandSite" Property="Visibility" Value="Visible" /> |
|
|
|
</Trigger> |
|
|
|
<Trigger Property="IsSelected" Value="False"> |
|
|
|
<Setter Property="Foreground" Value="Black" /> |
|
|
|
<Setter Property="FontSize" Value="14" /> |
|
|
|
<Setter TargetName="Bd" Property="Background" Value="#FFDDDDDD"/> |
|
|
|
<Setter TargetName="Bd" Property="BorderBrush" Value="#FF707070"/> |
|
|
|
<Setter TargetName="Bd" Property="BorderThickness" Value="1"/> |
|
|
|
<Trigger Property="IsEnabled" Value="false"> |
|
|
|
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" /> |
|
|
|
</Trigger> |
|
|
|
<!--<Trigger Property="IsMouseOver" Value="True"> |
|
|
|
<Setter Property="Foreground" Value="Black" /> |
|
|
|
<Setter Property="FontSize" Value="14" /> |
|
|
|
<Setter TargetName="Bd" Property="Background" Value="#FFDDDDDD"/> |
|
|
|
<Setter TargetName="Bd" Property="BorderBrush" Value="#FF707070"/> |
|
|
|
<Setter TargetName="Bd" Property="BorderThickness" Value="1"/> |
|
|
|
</Trigger>--> |
|
|
|
</ControlTemplate.Triggers> |
|
|
|
</ControlTemplate> |
|
|
|
</Setter.Value> |
|
|
|
</Setter> |
|
|
|
</Style> |
|
|
|
|
|
|
|
<!--#endregion--> |
|
|
|
</ResourceDictionary> |
|
|
|
</UserControl.Resources> |
|
|
|
<Grid x:Name="grid"> |
|
|
|
<Grid.ColumnDefinitions> |
|
|
|
<ColumnDefinition Width="260"/> |
|
|
|
<ColumnDefinition Width="250"/> |
|
|
|
<ColumnDefinition/> |
|
|
|
<ColumnDefinition Width="320"/> |
|
|
|
</Grid.ColumnDefinitions> |
|
|
|
|
|
|
|
<!--左侧选择区域--> |
|
|
|
<Grid> |
|
|
|
<TabControl TabStripPlacement="Left" Background="Transparent" BorderBrush="{StaticResource AccentBrush}" BorderThickness="1" Margin="4" Padding="5"> |
|
|
|
<TabItem Header="导航布局" Style="{DynamicResource TheTabItem1}"></TabItem> |
|
|
|
<TabItem Header="页面" Style="{DynamicResource TheTabItem1}"> |
|
|
|
|
|
|
|
</TabItem> |
|
|
|
<TabItem Header="组件树" Style="{DynamicResource TheTabItem1}"> |
|
|
|
<ListBox x:Name="CtlList" Background="Transparent" ItemTemplate="{DynamicResource ToolBoxStyle}" FontSize="14" BorderThickness="0" PreviewMouseMove="CtlList_PreviewMouseMove"/> |
|
|
|
</TabItem> |
|
|
|
</TabControl> |
|
|
|
<!--<Border BorderThickness="1" BorderBrush="{StaticResource AccentBrush}" Background="Transparent" Margin="4"> |
|
|
|
</Border>--> |
|
|
|
</Grid> |
|
|
|
<Border x:Name="bordermain" BorderThickness="1" BorderBrush="{StaticResource AccentBrush}" Background="Transparent" Margin="4"> |
|
|
|
<Grid> |
|
|
|
<Grid.RowDefinitions > |
|
|
|
<RowDefinition Height="{Binding Height, ElementName=wapanl}"/> |
|
|
|
<RowDefinition Height="{Binding Height, ElementName=PageList}" MaxHeight="500"/> |
|
|
|
<RowDefinition Height="*"/> |
|
|
|
</Grid.RowDefinitions> |
|
|
|
<Expander Style="{DynamicResource expang_1}" x:Name="wapanl" Header="菜单布局" Grid.Row="0" IsExpanded="False"> |
|
|
|
<WrapPanel Margin="10,0,10,5" > |
|
|
|
<RadioButton Margin="10,0,0,0" FontSize="14">顶部水平</RadioButton> |
|
|
|
<RadioButton IsChecked="True" Margin="10,0,0,0" FontSize="14">左侧垂直</RadioButton> |
|
|
|
<RadioButton Margin="10,0,0,0" FontSize="14">右侧垂直</RadioButton> |
|
|
|
<RadioButton Margin="10,0,0,0" FontSize="14">底部水平</RadioButton> |
|
|
|
</WrapPanel> |
|
|
|
</Expander> |
|
|
|
|
|
|
|
<Expander Style="{DynamicResource expang_1}" x:Name="expander" Margin="0,-10,0,0" Header="页面编辑" Grid.Row="1" IsExpanded="True"> |
|
|
|
<ListBox x:Name="PageList" Background="Transparent" Margin="0,0,0,10" MaxHeight="460" ScrollViewer.VerticalScrollBarVisibility="Auto" ItemTemplate="{DynamicResource PageBoxStyle}" FontSize="14" BorderThickness="0" > |
|
|
|
<ListBox.ContextMenu> |
|
|
|
<ContextMenu> |
|
|
|
<MenuItem Header="设置首页"> |
|
|
|
<MenuItem.Icon> |
|
|
|
<icon:PackIconModern Width="10" HorizontalAlignment="Center" Kind="HomeGarage" /> |
|
|
|
</MenuItem.Icon> |
|
|
|
</MenuItem> |
|
|
|
<MenuItem Header="向上移动"> |
|
|
|
<MenuItem.Icon> |
|
|
|
<icon:PackIconModern Width="10" HorizontalAlignment="Center" Kind="Upload" /> |
|
|
|
</MenuItem.Icon> |
|
|
|
</MenuItem> |
|
|
|
<MenuItem Header="向下移动"> |
|
|
|
<MenuItem.Icon> |
|
|
|
<icon:PackIconModern Width="10" HorizontalAlignment="Center" Kind="Download" /> |
|
|
|
</MenuItem.Icon> |
|
|
|
</MenuItem> |
|
|
|
<MenuItem Header="编辑信息"> |
|
|
|
<MenuItem.Icon> |
|
|
|
<icon:PackIconModern Width="10" HorizontalAlignment="Center" Kind="Edit" /> |
|
|
|
</MenuItem.Icon> |
|
|
|
</MenuItem> |
|
|
|
<MenuItem Header="删除该页"> |
|
|
|
<MenuItem.Icon> |
|
|
|
<icon:PackIconModern Width="10" HorizontalAlignment="Center" Kind="Delete" /> |
|
|
|
</MenuItem.Icon> |
|
|
|
</MenuItem> |
|
|
|
</ContextMenu> |
|
|
|
</ListBox.ContextMenu> |
|
|
|
</ListBox> |
|
|
|
</Expander> |
|
|
|
<icon:PackIconMaterial x:Name="icon" Width="24" Height="17" Grid.Row="1" Foreground="{StaticResource AccentBrush}" |
|
|
|
Margin="0,0,15,0" Cursor="Hand" HorizontalAlignment="Right" VerticalAlignment="Top" ToolTip="添加页" BorderThickness="1" Kind="HospitalBoxOutline" /> |
|
|
|
|
|
|
|
<Expander Style="{DynamicResource expang_1}" Margin="0,-10,0,10" Header="组件列表" Grid.Row="2" IsExpanded="True"/> |
|
|
|
<ListBox x:Name="CtlList" Grid.Row="2" Margin="0,30,0,0" Background="Transparent" ScrollViewer.VerticalScrollBarVisibility="Auto" ItemTemplate="{DynamicResource ToolBoxStyle}" FontSize="14" BorderThickness="0" PreviewMouseMove="CtlList_PreviewMouseMove" /> |
|
|
|
</Grid> |
|
|
|
</Border> |
|
|
|
|
|
|
|
<!--中间控制区域--> |
|
|
|
<DockPanel Grid.Column="1"> |
|
|
|