123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107 |
- <ResourceDictionary
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
- <ResourceDictionary.MergedDictionaries>
- <ResourceDictionary Source="/Resources/Common/Colors.xaml"/>
- </ResourceDictionary.MergedDictionaries>
- <Style x:Key="InputElement" TargetType="Control">
- <Setter Property="FontFamily" Value="微软雅黑" />
- <Setter Property="FontSize" Value="14" />
- <Setter Property="Height" Value="22" />
- <Setter Property="VerticalContentAlignment" Value="Center" />
- <Setter Property="Padding" Value="1" />
- </Style>
- <Style x:Key="TextBox" TargetType="TextBox" BasedOn="{StaticResource InputElement}">
- <Setter Property="MaxLength" Value="150"></Setter>
- <Style.Triggers>
- <Trigger Property="Validation.HasError" Value="true">
- <Setter Property="ToolTip"
- Value="{Binding RelativeSource={x:Static RelativeSource.Self},
- Path=(Validation.Errors)[0].ErrorContent}"/>
- </Trigger>
- </Style.Triggers>
- </Style>
- <Style TargetType="DatePickerTextBox" BasedOn="{StaticResource InputElement}">
- <Setter Property="IsReadOnly" Value="True"/>
- </Style>
- <Style TargetType="DatePicker" BasedOn="{StaticResource InputElement}">
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type DatePicker}">
- <Grid x:Name="PART_Root">
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="*" />
- <ColumnDefinition Width="Auto" />
- </Grid.ColumnDefinitions>
- <DatePickerTextBox x:Name="PART_TextBox"
- BorderBrush="{TemplateBinding BorderBrush}"
- BorderThickness="{TemplateBinding BorderThickness}"
- HorizontalContentAlignment="Stretch"
- Padding="{TemplateBinding Padding}"
- VerticalContentAlignment="Center"
- Visibility="Visible"
- Grid.Column="0">
- </DatePickerTextBox>
- <Button x:Name="PART_Button">
- <Button.Style>
- <Style TargetType="{x:Type Button}">
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type Button}">
- <Button x:Name="PART_Button" VerticalAlignment="Stretch">
- <Button.Style>
- <Style TargetType="{x:Type Button}">
- <Setter Property="OverridesDefaultStyle" Value="True"></Setter>
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type Button}">
- <Border Background="{StaticResource module-primary-color-brush}"
- Height="Auto"
- HorizontalAlignment="Right"
- Width="{Binding Path=Height, RelativeSource={RelativeSource Mode=Self}}"
- Padding="4,0,4,0"
- >
- <Image Name="buttonImage"
- Source="../resources/images/calendar.png"
- Stretch="None"
- VerticalAlignment="Center">
- </Image>
- </Border>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- </Button.Style>
- </Button>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- </Button.Style>
- </Button>
- <Popup x:Name="PART_Popup" StaysOpen="False" AllowsTransparency="True" />
- </Grid>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- <Style x:Key="ComboBox" TargetType="ComboBox" BasedOn="{StaticResource InputElement}">
- </Style>
- <Style x:Key="TextArea" TargetType="TextBox" BasedOn="{StaticResource InputElement}">
- <Setter Property="Height" Value="80"/>
- <Setter Property="TextWrapping" Value="Wrap"/>
- <Setter Property="AcceptsReturn" Value="True"/>
- <Setter Property="Padding" Value="3" />
- <Setter Property="VerticalContentAlignment" Value="Top" />
- <Setter Property="MaxLength" Value="1500"></Setter>
- </Style>
- <Style x:Key="PasswordBox" TargetType="PasswordBox" BasedOn="{StaticResource InputElement}">
- <Setter Property="MaxLength" Value="150"></Setter>
- </Style>
- </ResourceDictionary>
|