You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

76 lines
4.2 KiB
XML

<UserControl x:Class="SlnMesnac.WPF.Page.ManagePage.BaseManagePage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:SlnMesnac.WPF.Page.ManagePage"
mc:Ignorable="d"
d:DesignHeight="841" d:DesignWidth="1906">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="9*"/>
</Grid.ColumnDefinitions>
<Border Grid.Column="0">
<ListBox Background="Transparent"
Foreground="White"
BorderThickness="0"
FontSize="16"
ItemsSource="{Binding MenuItems}"
DisplayMemberPath="DisplayName"
SelectedValue="{Binding SelectedMenuItem, Mode=TwoWay}">
<ListBox.ItemContainerStyle>
<Style TargetType="ListBoxItem">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="ListBoxItem">
<StackPanel Height="35" Orientation="Horizontal" Background="Transparent" Name="Container" Cursor="Hand">
<Rectangle Fill="Blue" VerticalAlignment="Stretch" Width="5" Visibility="Hidden" Name="LeftSideRectangle"></Rectangle>
<ContentPresenter VerticalAlignment="Center" Margin="15 0 0 0"></ContentPresenter>
</StackPanel>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="true">
<Setter Property="Visibility" Value="Visible" TargetName="LeftSideRectangle"></Setter>
<Setter Property="Background" Value="#FF0077FB" TargetName="Container"/>
</Trigger>
<Trigger Property="IsSelected" Value="true">
<Setter Property="Visibility" Value="Visible" TargetName="LeftSideRectangle"></Setter>
<Setter Property="Background" Value="#FF004CE2" TargetName="Container"></Setter>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ListBox.ItemContainerStyle>
<!--<ListBoxItem Content="任务管理" IsSelected="True"/>
<ListBoxItem Content="AGV管理"/>
<ListBoxItem Content="任务模板管理"/>
<ListBoxItem Content="视觉管理"/>
<ListBoxItem Content="地图点位管理"/>-->
</ListBox>
</Border>
<Border Grid.Column="1">
<ContentControl Content="{Binding UserContent}">
<!--<ContentControl.Resources>
<DataTemplate DataType="{x:Type local:TaskManagePage}">
<local:TaskManagePage/>
</DataTemplate>
<DataTemplate DataType="{x:Type local:AGVManagePage}">
<local:AGVManagePage/>
</DataTemplate>
<DataTemplate DataType="{x:Type local:ModelManagePage}">
<local:ModelManagePage/>
</DataTemplate>
<DataTemplate DataType="{x:Type local:PositionManagePage}">
<local:PositionManagePage/>
</DataTemplate>
<DataTemplate DataType="{x:Type local:VisionManagePage}">
<local:VisionManagePage/>
</DataTemplate>
</ContentControl.Resources>-->
</ContentControl>
</Border>
</Grid>
</UserControl>