aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Tango.Touch
diff options
context:
space:
mode:
Diffstat (limited to 'Software/Visual_Studio/Tango.Touch')
-rw-r--r--Software/Visual_Studio/Tango.Touch/Controls/TouchNumericUpDownConrol.cs16
-rw-r--r--Software/Visual_Studio/Tango.Touch/Controls/TouchNumericUpDownConrol.xaml4
2 files changed, 17 insertions, 3 deletions
diff --git a/Software/Visual_Studio/Tango.Touch/Controls/TouchNumericUpDownConrol.cs b/Software/Visual_Studio/Tango.Touch/Controls/TouchNumericUpDownConrol.cs
index adb98d91d..2b85e8168 100644
--- a/Software/Visual_Studio/Tango.Touch/Controls/TouchNumericUpDownConrol.cs
+++ b/Software/Visual_Studio/Tango.Touch/Controls/TouchNumericUpDownConrol.cs
@@ -59,7 +59,21 @@ namespace Tango.Touch.Controls
/// </summary>
public static readonly DependencyProperty MaxValueProperty =
DependencyProperty.Register("MaxValue", typeof(double), typeof(TouchNumericUpDownConrol), new PropertyMetadata(100.0));
-
+
+
+
+ public double NumericPartWidth
+ {
+ get { return (double)GetValue(NumericPartWidthProperty); }
+ set { SetValue(NumericPartWidthProperty, value); }
+ }
+
+ // Using a DependencyProperty as the backing store for NumericPartWidth. This enables animation, styling, binding, etc...
+ public static readonly DependencyProperty NumericPartWidthProperty =
+ DependencyProperty.Register("NumericPartWidth", typeof(double), typeof(TouchNumericUpDownConrol), new PropertyMetadata(54.0));
+
+
+
#endregion
#region Commands
diff --git a/Software/Visual_Studio/Tango.Touch/Controls/TouchNumericUpDownConrol.xaml b/Software/Visual_Studio/Tango.Touch/Controls/TouchNumericUpDownConrol.xaml
index 31c32be83..9cfb89767 100644
--- a/Software/Visual_Studio/Tango.Touch/Controls/TouchNumericUpDownConrol.xaml
+++ b/Software/Visual_Studio/Tango.Touch/Controls/TouchNumericUpDownConrol.xaml
@@ -79,7 +79,7 @@
</Style.Triggers>
</Style>
</StackPanel.Resources>
- <Border Background="Transparent" BorderBrush="{StaticResource TangoGrayBrush}" BorderThickness="0.8" CornerRadius="2" Width="54">
+ <Border Background="Transparent" BorderBrush="{StaticResource TangoGrayBrush}" BorderThickness="0.8" CornerRadius="2" Width="{Binding NumericPartWidth,RelativeSource={RelativeSource AncestorType=local:TouchNumericUpDownConrol}}" >
<local:TouchNumericTextBox x:Name="Number_PART" Margin="0 4 0 0" FontSize="20" HorizontalContentAlignment="Center" VerticalAlignment="Center" BorderBrush="{TemplateBinding BorderBrush}" VerticalContentAlignment="Center" UpdateBindingOnlyWhenFocused="True"
Value="{Binding Value,RelativeSource={RelativeSource AncestorType=local:TouchNumericUpDownConrol}}" Minimum="{Binding MinValue,RelativeSource={RelativeSource AncestorType=local:TouchNumericUpDownConrol}}" Maximum="{Binding MaxValue,RelativeSource={RelativeSource AncestorType=local:TouchNumericUpDownConrol}}" HasDecimalPoint="True" StringFormat="0.#"/>
@@ -91,7 +91,7 @@
Command="{Binding Path=DecrementCommand,RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=local:TouchNumericUpDownConrol}, Mode=TwoWay}">
<local:TouchIcon Focusable="False" Icon="Minus" Width="16" Height="3"/>
</RepeatButton>
- <Rectangle Margin="1 0 0 0" Width="0.8" Fill="{StaticResource TangoGrayBrush}"></Rectangle>
+ <Rectangle Margin="1 0 1 0" Width="0.8" Fill="{StaticResource TangoGrayBrush}"></Rectangle>
<RepeatButton Focusable="False" Background="Transparent" Margin="8 0 0 0" Padding="4" Style="{StaticResource emptyButton}"
Command="{Binding Path=IncrementCommand,RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=local:TouchNumericUpDownConrol}, Mode=TwoWay}">
<local:TouchIcon Focusable="False" Icon="Plus" Width="16"/>