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.

206 lines
12 KiB

<Application x:Class="SchedulingSystemClient.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:SchedulingSystemClient"
StartupUri="LoginWindow.xaml">
<Application.Resources>
<Style x:Key="header" TargetType="DataGridColumnHeader">
<Setter Property="HorizontalContentAlignment" Value="Center"></Setter>
<Setter Property="Foreground" Value="Black"></Setter>
<Setter Property="Background" Value="#F5F7FA"></Setter>
<Setter Property="BorderBrush" Value="#ECEEF4"></Setter>
<Setter Property="BorderThickness" Value="1"></Setter>
<Setter Property="HorizontalContentAlignment" Value="Center"></Setter>
<Setter Property="VerticalContentAlignment" Value="Center"></Setter>
<Setter Property="FontSize" Value="20"></Setter>
<Setter Property="Height" Value="50"></Setter>
<Setter Property="FontWeight" Value="Black"></Setter>
</Style>
<Style x:Key="cell" TargetType="TextBlock">
<Setter Property="HorizontalAlignment" Value="Center"></Setter>
<Setter Property="Padding" Value="0,15,0,15"></Setter>
<Setter Property="Foreground" Value="Black"></Setter>
<Setter Property="FontSize" Value="18"></Setter>
</Style>
<Style x:Key="row" TargetType= "{x:Type DataGridRow}">
<Setter Property="BorderBrush" Value="#ECEEF4"></Setter>
<Style.Triggers>
<!--单行颜色-->
<Trigger Property= "ItemsControl.AlternationIndex"
Value= "0" >
<Setter Property= "Background" Value= "#FFFFFF" />
</Trigger>
<!--双行颜色-->
<Trigger Property= "ItemsControl.AlternationIndex"
Value= "1" >
<Setter Property= "Background" Value= "#FFFFFF" />
</Trigger>
<!--鼠标移入行颜色-->
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="#EDF0FA"/>
</Trigger>
</Style.Triggers>
</Style>
<Style x:Key="an" TargetType= "{x:Type Button}">
<Setter Property="Background" Value="#0000"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Button}">
<Border Background="{TemplateBinding Background}" BorderThickness="0">
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="#0000"/>
</Trigger>
</Style.Triggers>
</Style>
<!--选中行颜色-->
<Style x:Key="dgc" TargetType="DataGridCell">
<Setter Property="BorderBrush" Value="#ECEEF4"></Setter>
<Style.Triggers>
<Trigger Property="IsSelected" Value="True">
<Setter Property="Background" Value="#EDF0FA"/>
<Setter Property="BorderBrush" Value="#0000"/>
</Trigger>
</Style.Triggers>
</Style>
<Style x:Key="Dgrid" TargetType="DataGrid">
<!--内容边框颜色-->
<Setter Property="HorizontalGridLinesBrush" Value="#ECEEF4"></Setter>
<Setter Property="VerticalGridLinesBrush" Value="#ECEEF4"></Setter>
<!--获取或设置一个值,该值指示是否自动创建列-->
<Setter Property="AutoGenerateColumns" Value="False"/>
<!--获取或设置一个值,该值指示用户是否可使用鼠标调整列宽-->
<Setter Property="CanUserResizeColumns" Value="False"/>
<!--获取或设置一个值,该值指示用户能否通过用鼠标拖动列标题来更改列的显示顺序-->
<Setter Property="CanUserReorderColumns" Value="False"/>
<!--获取或设置一个值,该值指示用户是否可在 DataGrid 中添加新行-->
<Setter Property="CanUserAddRows" Value="False"/>
<!--获取或设置一个值,该值指示用户是否可从 DataGrid 中删除行-->
<Setter Property="CanUserDeleteRows" Value="False"/>
<Setter Property="IsReadOnly" Value="True"/>
<!--列表前面空白列-->
<Setter Property="RowHeaderWidth" Value="0"/>
</Style>
<Style x:Key="ComboBoxReadonlyToggleButton" TargetType="ToggleButton">
<Setter Property="IsTabStop" Value="false" />
<Setter Property="ClickMode" Value="Press" />
<Setter Property="MinHeight" Value="22"></Setter>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="ToggleButton">
<Grid>
<Border x:Name="Background" BorderBrush="#787878"
BorderThickness="1" Background="White">
<Path x:Name="Path" Height="Auto" Margin="0,0.082,0,8.859" Width="Auto"
Stretch="Fill" Stroke="{x:Null}" StrokeLineJoin="Round"
StrokeThickness="1"
Data="M0,3 C0,1.3431457 1.3431457,0 3,0 L129,0 C130.65686,0 132,1.3431457 132,3 L132,13.853975 C86.718803,0.055481441 26.160202,27.400364 0,11.585506 z">
<Path.Fill>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<!--combox背景色#198B53-->
<GradientStop Color="White" Offset="0.113" />
<GradientStop Color="White" Offset="1" />
</LinearGradientBrush>
</Path.Fill>
</Path>
</Border>
<!--倒三角的颜色#0099ff-->
<Path Height="10" x:Name="Path1" HorizontalAlignment="Right"
VerticalAlignment="Center" Margin="5,0,7,0" Width="10"
Fill="Black" Stretch="Fill" Stroke="Black"
Data="M0.5,0.5 L9.5,0.5 L5.0625,9.5 L5.0625,9.5 z" />
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<!--移入时按钮颜色 图案颜色 背景颜色 锯齿颜色-->
<Setter TargetName="Path1" Property="Fill" Value="Black"></Setter>
<Setter TargetName="Background" Property="Background" Value="White"></Setter>
<Setter TargetName="Background" Property="BorderBrush" Value="White"></Setter>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="DefaultComboBoxStyle" TargetType="ComboBox">
<Setter Property="Foreground" Value="Black" />
<Setter Property="VerticalAlignment" Value="Center"></Setter>
<Setter Property="HorizontalContentAlignment" Value="Left"></Setter>
<Setter Property="BorderBrush" Value="#FFFFFFFF" />
<Setter Property="BorderThickness" Value="1" />
<Setter Property="VerticalContentAlignment" Value="Center" />
<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto" />
<Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto" />
<Setter Property="Padding" Value="4,3" />
<Setter Property="ItemContainerStyle">
<Setter.Value>
<!--这个是下拉框的属性设置-->
<Style TargetType="ComboBoxItem">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="ComboBoxItem">
<Border Name="Back" Background="White" BorderThickness="0,0,0,0" BorderBrush="#525252" Padding="0,5">
<ContentPresenter ContentSource="{Binding Source}" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="10,0,0,0" ></ContentPresenter>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="Back" Property="Background" Value="#484848"></Setter>
</Trigger>
<!--下拉框背景色-->
<Trigger Property="IsHighlighted" Value="True">
<Setter TargetName="Back" Property="Background" Value="#3A99FF"></Setter>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</Setter.Value>
</Setter>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="ComboBox">
<Grid x:Name="MainGrid">
<Popup x:Name="PART_Popup" Margin="1" Grid.Row="1"
IsOpen="{Binding Path=IsDropDownOpen, RelativeSource={RelativeSource TemplatedParent}}">
<Grid x:Name="Shdw" MaxHeight="{TemplateBinding MaxDropDownHeight}"
MinWidth="{Binding Path=ActualWidth, ElementName=MainGrid}" >
<!--下拉框的属性设置-->
<!--Background -->
<Border x:Name="Bordertop" Width="AUTO" CornerRadius="0" BorderThickness="0" Background="White" >
<Border.Effect>
<DropShadowEffect Color="Black" BlurRadius="2" ShadowDepth="0" Opacity="1"/>
</Border.Effect>
<ScrollViewer Width="AUTO">
<ItemsPresenter />
</ScrollViewer>
</Border>
</Grid>
</Popup>
<ToggleButton Style="{StaticResource ComboBoxReadonlyToggleButton}"
BorderThickness="3" BorderBrush="#03ffea" Background="{TemplateBinding Background}"
IsChecked="{Binding Path=IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" />
<!--combox字体的间距-->
<TextBlock Margin="10 5 0 5"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
IsHitTestVisible="false"
Text="{TemplateBinding Text}" Foreground="Black"
/>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</Application.Resources>
</Application>