123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100 |
- <ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:aero="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Aero">
- <!--通用文本样式-->
- <Style TargetType="TextBox">
- <Setter Property="Margin" Value="0,10" />
- <Setter Property="Height" Value="35" />
- <!--<Setter Property="Width" Value="190"></Setter>-->
- <Setter Property="FontSize" Value="18" />
- <Setter Property="Background" Value="#FFDCF7F6"></Setter>
- <Style.Triggers>
- <Trigger Property="IsMouseOver" Value="True">
- <Setter Property="Foreground" Value="Green" />
- <Setter Property="BorderBrush" Value="Green" />
- <Setter Property="BorderThickness" Value="2" />
- </Trigger>
- <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="TextBox" x:Key="SmallTextBox" BasedOn="{StaticResource {x:Type TextBox}}">
- <Setter Property="Height" Value="25"/>
- <Setter Property="FontSize" Value="12" />
- </Style>
-
- <!--登录界面文本框样式-->
- <Style TargetType="TextBox" x:Key="LoginTextBox">
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="TextBoxBase">
- <aero:ListBoxChrome Background="{TemplateBinding Control.Background}" BorderBrush="{TemplateBinding Control.BorderBrush}" BorderThickness="{TemplateBinding Control.BorderThickness}" Name="Bd" RenderFocused="{TemplateBinding UIElement.IsKeyboardFocusWithin}" RenderMouseOver="{TemplateBinding UIElement.IsMouseOver}" SnapsToDevicePixels="True">
- <ScrollViewer Name="PART_ContentHost" SnapsToDevicePixels="{TemplateBinding UIElement.SnapsToDevicePixels}" />
- </aero:ListBoxChrome>
- <ControlTemplate.Triggers>
- <Trigger Property="UIElement.IsEnabled" Value="False">
- <Setter Property="aero:ListBoxChrome.Background" TargetName="Bd" Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}" />
- <Setter Property="Control.Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
- </Trigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- <Setter Property="Height" Value="40"></Setter>
- <Setter Property="Width" Value="190"></Setter>
- <Setter Property="FontSize" Value="20"></Setter>
- <Setter Property="Padding" Value="1,5,0,0"></Setter>
- <!--<Setter Property="Background">
- <Setter.Value>
- <ImageBrush ImageSource="pack://application:,,,/MECF.Framework.UI.Core;component/Resources/Login/输入框.png">
- </ImageBrush>
- </Setter.Value>
- </Setter>
- <Style.Triggers>
- <Trigger Property="IsFocused" Value="True">
- <Setter Property="Background">
- <Setter.Value>
- <ImageBrush ImageSource="pack://application:,,,/MECF.Framework.UI.Core;component/Resources/Login/输入框_选择.png">
- </ImageBrush>
- </Setter.Value>
- </Setter>
- </Trigger>
- </Style.Triggers>-->
- </Style>
- <!--Notch文本框样式-->
- <Style TargetType="{x:Type TextBox}" x:Key="NotchTextBox">
- <Setter Property="VerticalContentAlignment" Value="Center"/>
- <Setter Property="HorizontalContentAlignment" Value="Center"/>
- <Setter Property="Width" Value="50"/>
- <Setter Property="Height" Value="50"/>
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type TextBox}">
- <Grid x:Name="grid">
- <Rectangle x:Name="rectangle1" RadiusX="25" RadiusY="25" Fill="{TemplateBinding Background}" StrokeThickness="1" Stroke="Black"/>
- <ScrollViewer x:Name="PART_ContentHost"
- HorizontalScrollBarVisibility="Hidden"
- VerticalScrollBarVisibility="Hidden"
- Padding="{TemplateBinding Padding}"
- Focusable="false">
- </ScrollViewer>
- </Grid>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
-
- <!--反应腔盖-->
- <Style TargetType="TextBox" x:Key="ReactorMiniTextBox">
- <Setter Property="Width" Value="30" />
- <Setter Property="Cursor" Value="Hand" />
- </Style>
- </ResourceDictionary>
|