You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
127 lines
5.6 KiB
127 lines
5.6 KiB
<UserControl x:Class="ECMonitor.Page.SystemSet.Main"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:prism="http://prismlibrary.com/"
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
xmlns:names="clr-namespace:ECMonitor.Page.Name"
|
|
prism:ViewModelLocator.AutoWireViewModel="True"
|
|
mc:Ignorable="d" d:DesignHeight="450" d:DesignWidth="800">
|
|
|
|
<UserControl.Resources>
|
|
|
|
<SolidColorBrush x:Key="BtnInActiveBrush" Color="Transparent" />
|
|
<SolidColorBrush x:Key="BtnActiveBrush" Color="#478cb6" />
|
|
|
|
<Style x:Key="leftBtnBorder" TargetType="{x:Type Border}">
|
|
<Setter Property="Margin" Value="0,0,0,6" />
|
|
<Setter Property="Padding" Value="0" />
|
|
<Setter Property="CornerRadius" Value="5" />
|
|
<Setter Property="Background" Value="Transparent" />
|
|
<Setter Property="Cursor" Value="Hand" />
|
|
<Setter Property="HorizontalAlignment" Value="Center" />
|
|
<Setter Property="VerticalAlignment" Value="Center" />
|
|
</Style>
|
|
<Style x:Key="leftBtn" TargetType="{x:Type Button}" BasedOn="{StaticResource MaterialDesignFlatButton}">
|
|
<Setter Property="Width" Value="90" />
|
|
<Setter Property="Height" Value="65" />
|
|
<Setter Property="Padding" Value="0" />
|
|
<Setter Property="Background" Value="Transparent" />
|
|
<Setter Property="Cursor" Value="Hand" />
|
|
<Setter Property="HorizontalAlignment" Value="Center" />
|
|
<Setter Property="VerticalAlignment" Value="Center" />
|
|
</Style>
|
|
<Style x:Key="leftBtnPanel" TargetType="{x:Type StackPanel}">
|
|
<!--<Setter Property="HorizontalAlignment" Value="Center" />
|
|
<Setter Property="VerticalAlignment" Value="Center" />-->
|
|
</Style>
|
|
<Style x:Key="leftBtnImg" TargetType="{x:Type Image}">
|
|
<Setter Property="Width" Value="30" />
|
|
<Setter Property="Height" Value="30" />
|
|
<Setter Property="Margin" Value="0,0,0,5" />
|
|
<Setter Property="HorizontalAlignment" Value="Center" />
|
|
<Setter Property="VerticalAlignment" Value="Center" />
|
|
</Style>
|
|
<Style x:Key="leftBtnTxt" TargetType="{x:Type TextBlock}">
|
|
<Setter Property="FontSize" Value="13" />
|
|
<Setter Property="Foreground" Value="White" />
|
|
<Setter Property="HorizontalAlignment" Value="Center" />
|
|
<Setter Property="VerticalAlignment" Value="Center" />
|
|
</Style>
|
|
</UserControl.Resources>
|
|
|
|
<Grid Background="{DynamicResource PageBgBrush}">
|
|
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="120" />
|
|
<ColumnDefinition Width="*" />
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<Border Grid.Column="0" BorderBrush="{StaticResource PageBorderBrush}" BorderThickness="0,0,1,0">
|
|
<StackPanel Orientation="Vertical" HorizontalAlignment="Stretch"
|
|
Background="{DynamicResource PageBodyBrush}">
|
|
<ListBox x:Name="listBox" Style="{StaticResource MaterialDesignToolVerticalToggleListBox}"
|
|
Background="Transparent" Padding="0,10,0,0" SelectedIndex="0">
|
|
<ListBox.ItemContainerStyle>
|
|
<Style TargetType="{x:Type ListBoxItem}" BasedOn="{StaticResource {x:Type ListBoxItem}}">
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="{x:Type ListBoxItem}">
|
|
<Border x:Name="border" Style="{StaticResource leftBtnBorder}">
|
|
<ContentPresenter></ContentPresenter>
|
|
</Border>
|
|
<ControlTemplate.Triggers>
|
|
<Trigger Property="IsSelected" Value="True">
|
|
<Setter TargetName="border" Property="Background" Value="{StaticResource BtnActiveBrush}" />
|
|
</Trigger>
|
|
<Trigger Property="IsSelected" Value="False">
|
|
<Setter TargetName="border" Property="Background" Value="{StaticResource BtnInActiveBrush}" />
|
|
</Trigger>
|
|
<Trigger Property="IsMouseOver" Value="True">
|
|
<Setter TargetName="border" Property="Background" Value="{StaticResource BtnActiveBrush}" />
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
<EventSetter Event="Selected" Handler="ListBoxItem_Selected" />
|
|
</Style>
|
|
</ListBox.ItemContainerStyle>
|
|
|
|
<!--<ListBoxItem>
|
|
<Button Style="{StaticResource leftBtn}"
|
|
Command="{Binding NavigateCommand}" CommandParameter="{x:Static names:ViewsName.SystemSetManageSet}">
|
|
<StackPanel Style="{StaticResource leftBtnPanel}">
|
|
<Image Style="{StaticResource leftBtnImg}" Source="/set1.png" />
|
|
<TextBlock Style="{StaticResource leftBtnTxt}" Text="系统设置 " />
|
|
</StackPanel>
|
|
</Button>
|
|
</ListBoxItem>-->
|
|
|
|
<ListBoxItem>
|
|
<Button Style="{StaticResource leftBtn}"
|
|
Command="{Binding NavigateCommand}" CommandParameter="{x:Static names:ViewsName.SystemSetManageNvr}">
|
|
<StackPanel Style="{StaticResource leftBtnPanel}">
|
|
<Image Style="{StaticResource leftBtnImg}" Source="/camera1.png" />
|
|
<TextBlock Style="{StaticResource leftBtnTxt}" Text="录像机管理" />
|
|
</StackPanel>
|
|
</Button>
|
|
</ListBoxItem>
|
|
|
|
<ListBoxItem>
|
|
<Button Style="{StaticResource leftBtn}"
|
|
Command="{Binding NavigateCommand}" CommandParameter="{x:Static names:ViewsName.SystemSetManageIpc}">
|
|
<StackPanel Style="{StaticResource leftBtnPanel}">
|
|
<Image Style="{StaticResource leftBtnImg}" Source="/camera1.png" />
|
|
<TextBlock Style="{StaticResource leftBtnTxt}" Text="摄像机管理" />
|
|
</StackPanel>
|
|
</Button>
|
|
</ListBoxItem>
|
|
</ListBox>
|
|
</StackPanel>
|
|
</Border>
|
|
|
|
<ContentControl Grid.Column="1" Margin="8"
|
|
prism:RegionManager.RegionName="{x:Static names:RegionsName.SystemSetCenter}" />
|
|
</Grid>
|
|
</UserControl>
|