1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192 |
- <Application x:Class="AGV_WPF.App"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- StartupUri="Login.xaml">
- <Application.Resources>
- <!-- 表格样式设置 -->
- <Style TargetType="DataGrid">
- <!--网格线颜色-->
- <Setter Property="CanUserResizeColumns" Value="false"/>
- <Setter Property="Background" Value="#E6DBBB" />
- <Setter Property="BorderBrush" Value="#d6c79b" />
- <Setter Property="HorizontalGridLinesBrush">
- <Setter.Value>
- <SolidColorBrush Color="#d6c79b"/>
- </Setter.Value>
- </Setter>
- <Setter Property="VerticalGridLinesBrush">
- <Setter.Value>
- <SolidColorBrush Color="#d6c79b"/>
- </Setter.Value>
- </Setter>
- </Style>
- <Style TargetType="DataGridColumnHeader">
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="DataGridColumnHeader">
- <Border x:Name="BackgroundBorder" BorderThickness="0,1,0,1"
- BorderBrush="#e6dbba"
- Width="Auto">
- <Grid >
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="*" />
- </Grid.ColumnDefinitions>
- <ContentPresenter Margin="0,0,0,0" VerticalAlignment="Center" HorizontalAlignment="Center"/>
- <Path x:Name="SortArrow" Visibility="Collapsed" Data="M0,0 L1,0 0.5,1 z" Stretch="Fill" Grid.Column="2" Width="8" Height="6" Fill="White" Margin="0,0,50,0"
- VerticalAlignment="Center" RenderTransformOrigin="1,1" />
- <Rectangle Width="1" Fill="#d6c79b" HorizontalAlignment="Right" Grid.ColumnSpan="1" />
- </Grid>
- </Border>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- <!--行样式触发-->
- <Style TargetType="DataGridRow">
- <Setter Property="Background" Value="#F2F2F2" />
- <Setter Property="Height" Value="25"/>
- <Setter Property="Foreground" Value="Black" />
- <Style.Triggers>
- <!--隔行换色-->
- <Trigger Property="AlternationIndex" Value="0" >
- <Setter Property="Background" Value="#e7e7e7" />
- </Trigger>
- <Trigger Property="AlternationIndex" Value="1" >
- <Setter Property="Background" Value="#f2f2f2" />
- </Trigger>
- <Trigger Property="IsMouseOver" Value="True">
- <Setter Property="Background" Value="LightGray"/>
- </Trigger>
- <Trigger Property="IsSelected" Value="True">
- <Setter Property="Foreground" Value="Black"/>
- <Setter Property="Background" Value="DarkGray"/>
- </Trigger>
- </Style.Triggers>
- </Style>
- <!--单元格样式触发-->
- <Style TargetType="DataGridCell">
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="DataGridCell">
- <TextBlock TextAlignment="Center" VerticalAlignment="Center">
- <TextBlock.Triggers>
- </TextBlock.Triggers>
- <ContentPresenter />
- </TextBlock>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- <Style.Triggers>
- <Trigger Property="IsSelected" Value="True">
- <Setter Property="Foreground" Value="Black"/>
- </Trigger>
- </Style.Triggers>
- </Style>
- <CollectionViewSource x:Key="sysFonts" Source="{x:Static Fonts.SystemFontFamilies}" />
- </Application.Resources>
- </Application>
|