<Application x:Class="WpfApp05.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:WpfApp05"
StartupUri="TestWindow.xaml">
<Application.Resources>
<FontFamily x:Key="iconfont">Resources/#iconfont</FontFamily>
</Application.Resources>
</Application>
<Window x:Class="WpfApp05.TestWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:WpfApp05"
mc:Ignorable="d"
FontFamily="Microsoft YaHei" FontWeight="ExtraLight" Foreground="#333"
WindowStyle="None" AllowsTransparency="True" WindowStartupLocation="CenterScreen" Background="#FFF6F7FC"
ResizeMode="CanResizeWithGrip"
Title="TestWindow" Height="549.057" Width="815.094" MouseLeftButtonDown="Win_MouseLeftButtonDown">
<Window.Resources>
<Style TargetType="RadioButton" x:Key="LeftMenuItemButtonStyle">
<Setter Property="Foreground" Value="White"/>
<Setter Property="FontSize" Value="24"/>
<Setter Property="Cursor" Value="Hand"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="RadioButton">
<Grid Background="Transparent" Height="50" Name="back">
<TextBlock Text="{TemplateBinding Content}" FontFamily="{StaticResource iconfont}"
VerticalAlignment="Center" HorizontalAlignment="Center"/>
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="#11FFFFFF" TargetName="back"/>
</Trigger>
<Trigger Property="IsChecked" Value="True">
<Setter Property="Background" Value="#33FFFFFF" TargetName="back"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</Window.Resources>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="60"></ColumnDefinition>
<ColumnDefinition></ColumnDefinition>
</Grid.ColumnDefinitions>
<Border Background="#FF0B0BAA">
<Grid>
<Grid.RowDefinitions>
<RowDefinition></RowDefinition>
<RowDefinition></RowDefinition>
<RowDefinition></RowDefinition>
</Grid.RowDefinitions>
<StackPanel Grid.Row="1" VerticalAlignment="Center">
<RadioButton Content="" IsChecked="True" Style="{StaticResource LeftMenuItemButtonStyle}"
ToolTip="Dashboard"
Command="{Binding MenuItemCommand}"
CommandParameter="MonitorView"/>
<RadioButton Content="" Style="{StaticResource LeftMenuItemButtonStyle}"
ToolTip="设备"
Command="{Binding MenuItemCommand}"
CommandParameter="DeviceView" />
<RadioButton Content="" Style="{StaticResource LeftMenuItemButtonStyle}"
ToolTip="报警"
Command="{Binding MenuItemCommand}"
CommandParameter="AlarmView" />
<RadioButton Content="" Style="{StaticResource LeftMenuItemButtonStyle}"
ToolTip="报表"
Command="{Binding MenuItemCommand}"
CommandParameter="ReportView" Cursor="Hand"/>
</StackPanel>
</Grid>
</Border>
</Grid>
</Window>