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.
35 lines
2.1 KiB
35 lines
2.1 KiB
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:chrome="clr-namespace:Microsoft.Windows.Controls.Chromes"
|
|
xmlns:local="clr-namespace:Microsoft.Windows.Controls"
|
|
xmlns:coreConverters="clr-namespace:Microsoft.Windows.Controls.Core.Converters">
|
|
|
|
<coreConverters:InverseBoolConverter x:Key="InverseBoolConverter" />
|
|
|
|
<!-- =============================================================================== -->
|
|
<!-- MaskedTextBox -->
|
|
<!-- =============================================================================== -->
|
|
|
|
<Style TargetType="{x:Type local:MaskedTextBox}">
|
|
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.WindowTextBrushKey}}"/>
|
|
<Setter Property="Focusable" Value="False" />
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="{x:Type local:MaskedTextBox}">
|
|
<TextBox x:Name="TextBox"
|
|
Background="{TemplateBinding Background}"
|
|
FontFamily="{TemplateBinding FontFamily}"
|
|
FontSize="{TemplateBinding FontSize}"
|
|
FontStretch="{TemplateBinding FontStretch}"
|
|
FontStyle="{TemplateBinding FontStyle}"
|
|
FontWeight="{TemplateBinding FontWeight}"
|
|
Foreground="{TemplateBinding Foreground}"
|
|
IsReadOnly="{Binding IsEditable, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource InverseBoolConverter}}"
|
|
MinWidth="20" AcceptsReturn="False" TextWrapping="NoWrap"
|
|
Text="{Binding Text, RelativeSource={RelativeSource TemplatedParent}}" />
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
|
|
</ResourceDictionary>
|