35 lines
1.8 KiB
XML
35 lines
1.8 KiB
XML
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:u="clr-namespace:mbts.ui"
|
|
xmlns:c="clr-namespace:mbts.ui.controls"
|
|
xmlns:usp="clr-namespace:mbts.ui.spark"
|
|
xmlns:uspcv="clr-namespace:mbts.ui.spark.converters">
|
|
<ResourceDictionary.MergedDictionaries>
|
|
<ResourceDictionary Source="/view/Colors.xaml"/>
|
|
</ResourceDictionary.MergedDictionaries>
|
|
<uspcv:TickDisplayTwoWayConverter x:Key="TickDisplayTwoWayConverter" x:Shared="False"/>
|
|
<ControlTemplate x:Key="PriceEntryTemplate" TargetType="usp:PriceEntryControl">
|
|
<c:TickUpDown
|
|
BorderBrush="{TemplateBinding BorderBrush}"
|
|
BorderThickness="{TemplateBinding BorderThickness}"
|
|
Background="{TemplateBinding Background}"
|
|
TickUpCommand="{TemplateBinding TickUpCommand}"
|
|
TickDownCommand="{TemplateBinding TickDownCommand}"
|
|
>
|
|
<TextBox
|
|
x:Name="_text"
|
|
Background="{TemplateBinding Background}"
|
|
BorderBrush="{TemplateBinding BorderBrush}"
|
|
BorderThickness="{TemplateBinding BorderThickness}"
|
|
Text="{Binding Value, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource TickDisplayTwoWayConverter}, Mode=TwoWay}"
|
|
u:Behavior.DisablePaste="True"
|
|
/>
|
|
</c:TickUpDown>
|
|
</ControlTemplate>
|
|
<Style TargetType="usp:PriceEntryControl">
|
|
<Setter Property="Background" Value="{StaticResource TextBox.Static.Background.Brush}"/>
|
|
<Setter Property="BorderBrush" Value="{StaticResource TextBox.Static.Border.Brush}"/>
|
|
<Setter Property="BorderThickness" Value="1"/>
|
|
<Setter Property="Template" Value="{StaticResource PriceEntryTemplate}"/>
|
|
</Style>
|
|
</ResourceDictionary> |