|
|
@ -50,6 +50,9 @@ |
|
|
</Setter> |
|
|
</Setter> |
|
|
</Style> |
|
|
</Style> |
|
|
|
|
|
|
|
|
|
|
|
<DataTemplate x:Key="DefaultWatermarkTemplate"> |
|
|
|
|
|
<ContentControl Content="{Binding}" Foreground="Gray" /> |
|
|
|
|
|
</DataTemplate> |
|
|
|
|
|
|
|
|
<!-- =============================================================================== --> |
|
|
<!-- =============================================================================== --> |
|
|
<!-- CalculatorUpDown --> |
|
|
<!-- CalculatorUpDown --> |
|
|
@ -60,6 +63,7 @@ |
|
|
<Setter Property="Focusable" Value="False" /> |
|
|
<Setter Property="Focusable" Value="False" /> |
|
|
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.WindowTextBrushKey}}"/> |
|
|
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.WindowTextBrushKey}}"/> |
|
|
<Setter Property="HorizontalContentAlignment" Value="Right" /> |
|
|
<Setter Property="HorizontalContentAlignment" Value="Right" /> |
|
|
|
|
|
<Setter Property="WatermarkTemplate" Value="{StaticResource DefaultWatermarkTemplate}" /> |
|
|
<Setter Property="Template"> |
|
|
<Setter Property="Template"> |
|
|
<Setter.Value> |
|
|
<Setter.Value> |
|
|
<ControlTemplate TargetType="{x:Type local:CalculatorUpDown}"> |
|
|
<ControlTemplate TargetType="{x:Type local:CalculatorUpDown}"> |
|
|
@ -71,20 +75,22 @@ |
|
|
</Grid.ColumnDefinitions> |
|
|
</Grid.ColumnDefinitions> |
|
|
<local:ButtonSpinner x:Name="Spinner" IsTabStop="False" BorderThickness="{TemplateBinding BorderThickness}" |
|
|
<local:ButtonSpinner x:Name="Spinner" IsTabStop="False" BorderThickness="{TemplateBinding BorderThickness}" |
|
|
AllowSpin="{TemplateBinding AllowSpin}" ShowButtonSpinner="{TemplateBinding ShowButtonSpinner}"> |
|
|
AllowSpin="{TemplateBinding AllowSpin}" ShowButtonSpinner="{TemplateBinding ShowButtonSpinner}"> |
|
|
<TextBox x:Name="TextBox" BorderThickness="0" |
|
|
<local:WatermarkTextBox x:Name="TextBox" BorderThickness="0" |
|
|
Background="{TemplateBinding Background}" |
|
|
Background="{TemplateBinding Background}" |
|
|
FontFamily="{TemplateBinding FontFamily}" |
|
|
FontFamily="{TemplateBinding FontFamily}" |
|
|
FontSize="{TemplateBinding FontSize}" |
|
|
FontSize="{TemplateBinding FontSize}" |
|
|
FontStretch="{TemplateBinding FontStretch}" |
|
|
FontStretch="{TemplateBinding FontStretch}" |
|
|
FontStyle="{TemplateBinding FontStyle}" |
|
|
FontStyle="{TemplateBinding FontStyle}" |
|
|
FontWeight="{TemplateBinding FontWeight}" |
|
|
FontWeight="{TemplateBinding FontWeight}" |
|
|
Foreground="{TemplateBinding Foreground}" |
|
|
Foreground="{TemplateBinding Foreground}" |
|
|
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" |
|
|
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" |
|
|
IsReadOnly="{Binding IsEditable, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource InverseBoolConverter}}" |
|
|
IsReadOnly="{Binding IsEditable, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource InverseBoolConverter}}" |
|
|
MinWidth="20" AcceptsReturn="False" |
|
|
MinWidth="20" AcceptsReturn="False" |
|
|
TextWrapping="NoWrap" |
|
|
TextWrapping="NoWrap" |
|
|
TabIndex="{TemplateBinding TabIndex}" |
|
|
TabIndex="{TemplateBinding TabIndex}" |
|
|
Text="{Binding Text, RelativeSource={RelativeSource TemplatedParent}}" /> |
|
|
Text="{Binding Text, RelativeSource={RelativeSource TemplatedParent}}" |
|
|
|
|
|
Watermark="{TemplateBinding Watermark}" |
|
|
|
|
|
WatermarkTemplate="{TemplateBinding WatermarkTemplate}"/> |
|
|
</local:ButtonSpinner> |
|
|
</local:ButtonSpinner> |
|
|
<ToggleButton x:Name="_calculatorToggleButton" Grid.Column="1" |
|
|
<ToggleButton x:Name="_calculatorToggleButton" Grid.Column="1" |
|
|
IsChecked="{Binding IsOpen, RelativeSource={RelativeSource TemplatedParent}}" |
|
|
IsChecked="{Binding IsOpen, RelativeSource={RelativeSource TemplatedParent}}" |
|
|
|