| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470 |
- <ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:Themes="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Aero"
- xmlns:d="http://schemas.microsoft.com/expression/blend/2008">
- <!--
- <Style x:Key="TextBoxStyle1" TargetType="{x:Type TextBox}">
- <Setter Property="BorderBrush" Value="{DynamicResource MuchinfoBrush22}" />
- <Setter Property="BorderThickness" Value="1" />
- <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.WindowTextBrushKey}}" />
- <Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.WindowBrushKey}}" />
- <Setter Property="Padding" Value="1" />
- <Setter Property="KeyboardNavigation.TabNavigation" Value="None" />
- <Setter Property="HorizontalContentAlignment" Value="Left" />
- <Setter Property="VerticalContentAlignment" Value="Bottom" />
- <Setter Property="FocusVisualStyle" Value="{x:Null}" />
- <Setter Property="AllowDrop" Value="True" />
- <Setter Property="ScrollViewer.PanningMode" Value="VerticalFirst" />
- <Setter Property="Stylus.IsFlicksEnabled" Value="False" />
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type TextBox}">
- <Themes:ClassicBorderDecorator x:Name="Bd"
- Background="{TemplateBinding Background}"
- BorderBrush="{TemplateBinding BorderBrush}"
- BorderStyle="None"
- BorderThickness="{TemplateBinding BorderThickness}"
- UseLayoutRounding="True"
- d:DesignUseLayoutRounding="True">
- <ScrollViewer x:Name="PART_ContentHost"
- UseLayoutRounding="True"
- d:DesignUseLayoutRounding="True" />
- </Themes:ClassicBorderDecorator>
- <ControlTemplate.Triggers>
- <Trigger Property="IsEnabled" Value="False">
- <Setter TargetName="Bd" Property="Background" Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}" />
- <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
- </Trigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- -->
- <!--
- <Style TargetType="{x:Type TextBox}">
- <Setter Property="BorderBrush" Value="{DynamicResource MuchinfoBrush22}" />
- <Setter Property="BorderThickness" Value="1" />
- <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.WindowTextBrushKey}}" />
- <Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.WindowBrushKey}}" />
- <Setter Property="Padding" Value="1" />
- <Setter Property="KeyboardNavigation.TabNavigation" Value="None" />
- <Setter Property="HorizontalContentAlignment" Value="Left" />
- <Setter Property="VerticalContentAlignment" Value="Bottom" />
- <Setter Property="FocusVisualStyle" Value="{x:Null}" />
- <Setter Property="AllowDrop" Value="true" />
- <Setter Property="ScrollViewer.PanningMode" Value="VerticalFirst" />
- <Setter Property="Stylus.IsFlicksEnabled" Value="False" />
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type TextBox}">
- <themes:ClassicBorderDecorator x:Name="Bd"
- Background="{TemplateBinding Background}"
- BorderBrush="{TemplateBinding BorderBrush}"
- BorderStyle="None"
- BorderThickness="{TemplateBinding BorderThickness}">
- <ScrollViewer x:Name="PART_ContentHost" />
- </themes:ClassicBorderDecorator>
- <ControlTemplate.Triggers>
- <Trigger Property="IsEnabled" Value="false">
- <Setter TargetName="Bd" Property="Background" Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}" />
- <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
- </Trigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- -->
- <Style x:Key="CommonTextBoxStyle" TargetType="{x:Type TextBox}">
- <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" />
- <Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.WindowBrushKey}}" />
- <Setter Property="BorderBrush" Value="{DynamicResource MuchinfoBrush22}" />
- <Setter Property="VerticalContentAlignment" Value="Center" />
- <Setter Property="VerticalAlignment" Value="Center" />
- <Setter Property="BorderThickness" Value="1" />
- <Setter Property="Padding" Value="0" />
- <Setter Property="AllowDrop" Value="true" />
- <Setter Property="FocusVisualStyle" Value="{x:Null}" />
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type TextBox}">
- <Themes:ListBoxChrome x:Name="Bd"
- Background="{TemplateBinding Background}"
- BorderBrush="{TemplateBinding BorderBrush}"
- BorderThickness="{TemplateBinding BorderThickness}"
- RenderFocused="{TemplateBinding IsKeyboardFocusWithin}"
- RenderMouseOver="{TemplateBinding IsMouseOver}"
- SnapsToDevicePixels="true">
- <ScrollViewer x:Name="PART_ContentHost"
- VerticalAlignment="{TemplateBinding VerticalAlignment}"
- VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
- SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
- </Themes:ListBoxChrome>
- <ControlTemplate.Triggers>
- <Trigger Property="IsEnabled" Value="False">
- <Setter TargetName="Bd" Property="Background" Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}" />
- <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
- <Setter Property="BorderThickness" Value="1" />
- </Trigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- <Style BasedOn="{StaticResource CommonTextBoxStyle}" TargetType="{x:Type TextBox}" />
- <Style x:Key="ComboBoxFocusVisual">
- <Setter Property="Control.Template">
- <Setter.Value>
- <ControlTemplate>
- <Rectangle Margin="4,4,21,4"
- SnapsToDevicePixels="true"
- Stroke="Black"
- StrokeDashArray="1 2"
- StrokeThickness="1" />
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- <LinearGradientBrush x:Key="ButtonNormalBackground" StartPoint="0,0" EndPoint="0,1">
- <GradientStop Offset="0" Color="#F3F3F3" />
- <GradientStop Offset="0.5" Color="#EBEBEB" />
- <GradientStop Offset="0.5" Color="#DDDDDD" />
- <GradientStop Offset="1" Color="#CDCDCD" />
- </LinearGradientBrush>
- <SolidColorBrush x:Key="ButtonNormalBorder" Color="#FF707070" />
- <Geometry x:Key="DownArrowGeometry">M 0 0 L 3.5 4 L 7 0 Z</Geometry>
- <Style x:Key="ComboBoxReadonlyToggleButton" TargetType="{x:Type ToggleButton}">
- <Setter Property="OverridesDefaultStyle" Value="true" />
- <Setter Property="IsTabStop" Value="false" />
- <Setter Property="Focusable" Value="false" />
- <Setter Property="ClickMode" Value="Press" />
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type ToggleButton}">
- <Themes:ButtonChrome x:Name="Chrome"
- Background="{TemplateBinding Background}"
- BorderBrush="{TemplateBinding BorderBrush}"
- RenderMouseOver="{TemplateBinding IsMouseOver}"
- RenderPressed="{TemplateBinding IsPressed}"
- SnapsToDevicePixels="true">
- <Grid Width="{DynamicResource {x:Static SystemParameters.VerticalScrollBarWidthKey}}" HorizontalAlignment="Right">
- <Path x:Name="Arrow"
- Margin="3,1,0,0"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- Data="{StaticResource DownArrowGeometry}"
- Fill="Black" />
- </Grid>
- </Themes:ButtonChrome>
- <ControlTemplate.Triggers>
- <Trigger Property="IsChecked" Value="true">
- <Setter TargetName="Chrome" Property="RenderPressed" Value="true" />
- </Trigger>
- <Trigger Property="IsEnabled" Value="false">
- <Setter TargetName="Arrow" Property="Fill" Value="#AFAFAF" />
- </Trigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- <LinearGradientBrush x:Key="TextBoxBorder" MappingMode="Absolute" StartPoint="0,0" EndPoint="0,20">
- <GradientStop Offset="0.05" Color="#ABADB3" />
- <GradientStop Offset="0.07" Color="#E2E3EA" />
- <GradientStop Offset="1" Color="#E3E9EF" />
- </LinearGradientBrush>
- <Style x:Key="ComboBoxEditableTextBox" TargetType="{x:Type TextBox}">
- <Setter Property="OverridesDefaultStyle" Value="true" />
- <Setter Property="AllowDrop" Value="true" />
- <Setter Property="MinWidth" Value="0" />
- <Setter Property="MinHeight" Value="0" />
- <Setter Property="FocusVisualStyle" Value="{x:Null}" />
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type TextBox}">
- <ScrollViewer x:Name="PART_ContentHost"
- Background="Transparent"
- Focusable="false"
- HorizontalScrollBarVisibility="Hidden"
- VerticalScrollBarVisibility="Hidden" />
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- <Style x:Key="ComboBoxToggleButton2" TargetType="{x:Type ToggleButton}">
- <Setter Property="OverridesDefaultStyle" Value="true" />
- <Setter Property="IsTabStop" Value="false" />
- <Setter Property="Focusable" Value="false" />
- <Setter Property="ClickMode" Value="Press" />
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type ToggleButton}">
- <Themes:ButtonChrome x:Name="Chrome"
- Width="{DynamicResource {x:Static SystemParameters.VerticalScrollBarWidthKey}}"
- Background="{TemplateBinding Background}"
- BorderBrush="{TemplateBinding BorderBrush}"
- RenderMouseOver="{TemplateBinding IsMouseOver}"
- RenderPressed="{TemplateBinding IsPressed}"
- RoundCorners="false"
- SnapsToDevicePixels="true">
- <Path x:Name="Arrow"
- Margin="0,1,0,0"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- Data="{StaticResource DownArrowGeometry}"
- Fill="Black" />
- </Themes:ButtonChrome>
- <ControlTemplate.Triggers>
- <Trigger Property="IsChecked" Value="true">
- <Setter TargetName="Chrome" Property="RenderPressed" Value="true" />
- </Trigger>
- <Trigger Property="IsEnabled" Value="false">
- <Setter TargetName="Arrow" Property="Fill" Value="#AFAFAF" />
- </Trigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- <ControlTemplate x:Key="ComboBoxEditableTemplate" TargetType="{x:Type ComboBox}">
- <Grid x:Name="Placement" SnapsToDevicePixels="true">
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="*" />
- <ColumnDefinition Width="Auto" />
- </Grid.ColumnDefinitions>
- <Popup x:Name="PART_Popup"
- Grid.ColumnSpan="2"
- AllowsTransparency="true"
- IsOpen="{Binding IsDropDownOpen,
- RelativeSource={RelativeSource TemplatedParent}}"
- Placement="Bottom"
- PopupAnimation="{DynamicResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}">
- <Themes:SystemDropShadowChrome x:Name="Shdw"
- MinWidth="{Binding ActualWidth,
- ElementName=Placement}"
- MaxHeight="{TemplateBinding MaxDropDownHeight}"
- Color="Transparent">
- <Border x:Name="DropDownBorder"
- Background="{DynamicResource {x:Static SystemColors.WindowBrushKey}}"
- BorderBrush="{DynamicResource {x:Static SystemColors.WindowFrameBrushKey}}"
- BorderThickness="1">
- <ScrollViewer>
- <ItemsPresenter KeyboardNavigation.DirectionalNavigation="Contained" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
- </ScrollViewer>
- </Border>
- </Themes:SystemDropShadowChrome>
- </Popup>
- <Themes:ListBoxChrome x:Name="Border"
- Grid.ColumnSpan="2"
- Background="{TemplateBinding Background}"
- BorderBrush="{TemplateBinding BorderBrush}"
- BorderThickness="{TemplateBinding BorderThickness}"
- RenderFocused="{TemplateBinding IsKeyboardFocusWithin}"
- RenderMouseOver="{TemplateBinding IsMouseOver}" />
- <TextBox x:Name="PART_EditableTextBox"
- Margin="{TemplateBinding Padding}"
- HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
- VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
- IsReadOnly="{Binding IsReadOnly,
- RelativeSource={RelativeSource TemplatedParent}}"
- Style="{StaticResource ComboBoxEditableTextBox}" />
- <ToggleButton Grid.Column="1"
- IsChecked="{Binding IsDropDownOpen,
- Mode=TwoWay,
- RelativeSource={RelativeSource TemplatedParent}}"
- Style="{StaticResource ComboBoxToggleButton2}" />
- </Grid>
- <ControlTemplate.Triggers>
- <Trigger Property="IsKeyboardFocusWithin" Value="true">
- <Setter Property="Foreground" Value="Black" />
- </Trigger>
- <Trigger Property="IsDropDownOpen" Value="true">
- <Setter TargetName="Border" Property="RenderFocused" Value="true" />
- </Trigger>
- <Trigger Property="HasItems" Value="false">
- <Setter TargetName="DropDownBorder" Property="Height" Value="95" />
- </Trigger>
- <Trigger Property="IsEnabled" Value="false">
- <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
- <Setter Property="Background" Value="#FFF4F4F4" />
- </Trigger>
- <Trigger Property="IsGrouping" Value="true">
- <Setter Property="ScrollViewer.CanContentScroll" Value="false" />
- </Trigger>
- <Trigger SourceName="PART_Popup" Property="HasDropShadow" Value="true">
- <Setter TargetName="Shdw" Property="Margin" Value="0,0,5,5" />
- <Setter TargetName="Shdw" Property="Color" Value="#71000000" />
- </Trigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- <Style x:Key="ComboBoxStyle1" TargetType="{x:Type ComboBox}">
- <Setter Property="FocusVisualStyle" Value="{StaticResource ComboBoxFocusVisual}" />
- <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.WindowTextBrushKey}}" />
- <Setter Property="Background" Value="{StaticResource ButtonNormalBackground}" />
- <Setter Property="BorderBrush" Value="{StaticResource ButtonNormalBorder}" />
- <Setter Property="BorderThickness" Value="1" />
- <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto" />
- <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto" />
- <Setter Property="Padding" Value="4,3" />
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type ComboBox}">
- <Grid x:Name="MainGrid" SnapsToDevicePixels="true">
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="*" />
- <ColumnDefinition Width="0" MinWidth="{DynamicResource {x:Static SystemParameters.VerticalScrollBarWidthKey}}" />
- </Grid.ColumnDefinitions>
- <Popup x:Name="PART_Popup"
- Grid.ColumnSpan="2"
- Margin="1"
- AllowsTransparency="true"
- IsOpen="{Binding IsDropDownOpen,
- RelativeSource={RelativeSource TemplatedParent}}"
- Placement="Bottom"
- PopupAnimation="{DynamicResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}">
- <Themes:SystemDropShadowChrome x:Name="Shdw"
- MinWidth="{Binding ActualWidth,
- ElementName=MainGrid}"
- MaxHeight="{TemplateBinding MaxDropDownHeight}"
- Color="Transparent">
- <Border x:Name="DropDownBorder"
- Background="{DynamicResource {x:Static SystemColors.WindowBrushKey}}"
- BorderBrush="{DynamicResource {x:Static SystemColors.WindowFrameBrushKey}}"
- BorderThickness="1">
- <ScrollViewer CanContentScroll="true">
- <ItemsPresenter KeyboardNavigation.DirectionalNavigation="Contained" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
- </ScrollViewer>
- </Border>
- </Themes:SystemDropShadowChrome>
- </Popup>
- <ToggleButton Grid.ColumnSpan="2"
- Background="{TemplateBinding Background}"
- BorderBrush="{TemplateBinding BorderBrush}"
- IsChecked="{Binding IsDropDownOpen,
- Mode=TwoWay,
- RelativeSource={RelativeSource TemplatedParent}}"
- Style="{StaticResource ComboBoxReadonlyToggleButton}" />
- <ContentPresenter Margin="{TemplateBinding Padding}"
- HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
- VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
- Content="{TemplateBinding SelectionBoxItem}"
- ContentStringFormat="{TemplateBinding SelectionBoxItemStringFormat}"
- ContentTemplate="{TemplateBinding SelectionBoxItemTemplate}"
- ContentTemplateSelector="{TemplateBinding ItemTemplateSelector}"
- IsHitTestVisible="false"
- SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
- </Grid>
- <ControlTemplate.Triggers>
- <Trigger SourceName="PART_Popup" Property="HasDropShadow" Value="true">
- <Setter TargetName="Shdw" Property="Margin" Value="0,0,5,5" />
- <Setter TargetName="Shdw" Property="Color" Value="#71000000" />
- </Trigger>
- <Trigger Property="HasItems" Value="false">
- <Setter TargetName="DropDownBorder" Property="Height" Value="95" />
- </Trigger>
- <Trigger Property="IsEnabled" Value="false">
- <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
- <Setter Property="Background" Value="#FFF4F4F4" />
- </Trigger>
- <Trigger Property="IsGrouping" Value="true">
- <Setter Property="ScrollViewer.CanContentScroll" Value="false" />
- </Trigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- <Style.Triggers>
- <Trigger Property="IsEditable" Value="true">
- <Setter Property="BorderBrush" Value="{StaticResource TextBoxBorder}" />
- <Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.WindowBrushKey}}" />
- <Setter Property="IsTabStop" Value="false" />
- <Setter Property="Padding" Value="3" />
- <Setter Property="Template" Value="{StaticResource ComboBoxEditableTemplate}" />
- </Trigger>
- </Style.Triggers>
- </Style>
- <Style x:Key="NomalTextBlockStyle" TargetType="TextBlock">
- <Setter Property="Foreground" Value="{DynamicResource MuchinfoBrush30}" />
- <Setter Property="FontWeight" Value="Bold" />
- </Style>
- <Style x:Key="NumberTextBlockStyle" TargetType="TextBlock">
- <Setter Property="Foreground" Value="{DynamicResource MuchinfoBrush31}" />
- <Setter Property="FontWeight" Value="Bold" />
- </Style>
- <Style x:Key="RectangleTextBox" TargetType="{x:Type TextBox}">
- <Setter Property="BorderBrush" Value="{DynamicResource CommonBorderBrush}" />
- <Setter Property="BorderThickness" Value="1" />
- <Setter Property="Height" Value="24" />
- <Setter Property="IsEnabled" Value="False" />
- <Setter Property="Foreground" Value="{DynamicResource ContentForeGround}" />
- <Setter Property="Background" Value="{DynamicResource ContentBackground}" />
- <Setter Property="Padding" Value="1" />
- <Setter Property="KeyboardNavigation.TabNavigation" Value="None" />
- <Setter Property="HorizontalContentAlignment" Value="Center" />
- <Setter Property="VerticalContentAlignment" Value="Center" />
- <Setter Property="VerticalAlignment" Value="Stretch" />
- <Setter Property="FocusVisualStyle" Value="{x:Null}" />
- <Setter Property="AllowDrop" Value="true" />
- <Setter Property="ScrollViewer.PanningMode" Value="VerticalFirst" />
- <Setter Property="Stylus.IsFlicksEnabled" Value="False" />
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type TextBox}">
- <Border Background="{TemplateBinding Background}"
- BorderBrush="{TemplateBinding BorderBrush}"
- BorderThickness="{TemplateBinding BorderThickness}"
- CornerRadius="3">
- <Grid>
- <ScrollViewer x:Name="PART_ContentHost"
- HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
- VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
- <Rectangle x:Name="rectangle"
- HorizontalAlignment="Stretch"
- VerticalAlignment="Stretch"
- Fill="#50585858"
- Visibility="Collapsed" />
- </Grid>
- </Border>
- <ControlTemplate.Triggers>
- <Trigger Property="IsEnabled" Value="false">
- <Setter TargetName="rectangle" Property="Visibility" Value="Visible" />
- <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
- </Trigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- <Style x:Key="TextBoxStyle" TargetType="TextBox">
- <Setter Property="Margin" Value="5,1,0,1" />
- <Setter Property="HorizontalAlignment" Value="Left" />
- <Setter Property="Height" Value="23" />
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type TextBox}">
- <Border x:Name="border"
- Width="Auto"
- BorderBrush="DarkGray"
- BorderThickness="1">
- <Grid x:Name="grid" Background="#FFFFFF">
- <ScrollViewer x:Name="PART_ContentHost"
- HorizontalAlignment="Left"
- VerticalAlignment="Center"
- VerticalContentAlignment="Center" />
- </Grid>
- </Border>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- </ResourceDictionary>
|