38 lines
2.4 KiB
XML
38 lines
2.4 KiB
XML
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:local="clr-namespace:_29WxOrderWpf.UserControls">
|
|
|
|
<Style TargetType="{x:Type local:UcWaterMarkTextBox}">
|
|
<Setter Property="Background" Value="Transparent"/>
|
|
<Setter Property="BorderBrush" Value="Transparent"/>
|
|
<Setter Property="BorderThickness" Value="1"/>
|
|
<Setter Property="WaterMark" Value="请输入"/>
|
|
<!--<Setter Property="Text" Value=""/>-->
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="{x:Type local:UcWaterMarkTextBox}">
|
|
<Border x:Name="border" CornerRadius="4" BorderBrush="{TemplateBinding BorderBrush}"
|
|
BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" SnapsToDevicePixels="True">
|
|
<Grid>
|
|
<ScrollViewer x:Name="PART_ContentHost" Focusable="False" HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Hidden"/>
|
|
<!--<TextBlock Text="{TemplateBinding WaterMark}" Grid.Column="2" Margin="8,0,8,0" VerticalAlignment="Center" IsHitTestVisible="False" Foreground="LightGray"
|
|
Visibility="{Binding ElementName=txtGoodsName,Path=Text,Converter={StaticResource NotHasTextVisibility}}"></TextBlock>-->
|
|
<TextBlock Text="{TemplateBinding WaterMark}" Grid.Column="2" Margin="8,0,8,0" VerticalAlignment="Center" IsHitTestVisible="False" Foreground="LightGray"
|
|
></TextBlock>
|
|
|
|
<TextBlock Text="33333" Grid.Column="2" Margin="8,0,8,0" VerticalAlignment="Center" IsHitTestVisible="False" Foreground="LightGray"
|
|
></TextBlock>
|
|
</Grid>
|
|
</Border>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
<!--去除高亮框-->
|
|
<Style.Triggers>
|
|
<Trigger Property="IsKeyboardFocusWithin" Value="True">
|
|
<Setter Property="BorderBrush" Value="Transparent"/>
|
|
<Setter Property="BorderThickness" Value="0"/>
|
|
</Trigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
</ResourceDictionary> |