diff options
| author | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-06-20 16:24:10 +0300 |
|---|---|---|
| committer | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-06-20 16:24:10 +0300 |
| commit | cda2e6fb9c2f6e92e3800a8d21a2691f5744bb6b (patch) | |
| tree | b791635c0030f5e9a41d7eacd3388b2aee685f50 /Software/Visual_Studio/Tango.Touch | |
| parent | bc5b579516e8b770338ff2924cc2215d1f46da2d (diff) | |
| download | Tango-cda2e6fb9c2f6e92e3800a8d21a2691f5744bb6b.tar.gz Tango-cda2e6fb9c2f6e92e3800a8d21a2691f5744bb6b.zip | |
Working on PPC...
Diffstat (limited to 'Software/Visual_Studio/Tango.Touch')
6 files changed, 56 insertions, 10 deletions
diff --git a/Software/Visual_Studio/Tango.Touch/Controls/TouchExpander.xaml b/Software/Visual_Studio/Tango.Touch/Controls/TouchExpander.xaml index 87a164158..9122744bf 100644 --- a/Software/Visual_Studio/Tango.Touch/Controls/TouchExpander.xaml +++ b/Software/Visual_Studio/Tango.Touch/Controls/TouchExpander.xaml @@ -9,6 +9,7 @@ </ResourceDictionary.MergedDictionaries> <Style TargetType="{x:Type local:TouchExpander}"> + <Setter Property="Padding" Value="10"></Setter> <Setter Property="Background" Value="{StaticResource TangoPrimaryBackgroundBrush}"></Setter> <Setter Property="Template"> <Setter.Value> @@ -17,7 +18,7 @@ BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Padding="{TemplateBinding Padding}" CornerRadius="{TemplateBinding CornerRadius}"> <Border.Effect> - <DropShadowEffect Color="Gray" ShadowDepth="0" /> + <DropShadowEffect Color="{StaticResource TangoDropShadowColor}" ShadowDepth="0" /> </Border.Effect> <Grid> @@ -27,7 +28,7 @@ </Grid.RowDefinitions> <DockPanel Grid.Row="0"> - <local:TouchToggleButton CornerRadius="50" RenderTransformOrigin="0.5,0.5" Background="{StaticResource TangoExpanderIconBrush}" EnableDropShadow="False" Width="32" Height="32" DockPanel.Dock="Right" IsChecked="{Binding RelativeSource={RelativeSource AncestorType=local:TouchExpander},Path=IsExpanded,Mode=TwoWay}"> + <local:TouchToggleButton CornerRadius="50" RenderTransformOrigin="0.5,0.5" Background="{StaticResource TangoExpanderIconBackgroundBrush}" EnableDropShadow="False" Width="40" Height="40" DockPanel.Dock="Right" IsChecked="{Binding RelativeSource={RelativeSource AncestorType=local:TouchExpander},Path=IsExpanded,Mode=TwoWay}"> <local:TouchToggleButton.RenderTransform> <RotateTransform x:Name="Rotate" /> </local:TouchToggleButton.RenderTransform> @@ -53,11 +54,11 @@ </local:TouchToggleButton.Triggers> <local:TouchToggleButton.CheckedContent> <Grid> - <fa:ImageAwesome Icon="Minus" Foreground="{StaticResource TangoDarkForegroundBrush}" Width="10" Height="10" /> + <fa:ImageAwesome Icon="Minus" Foreground="{StaticResource TangoExpanderIconForegroundBrush}" Width="10" Height="10" /> </Grid> </local:TouchToggleButton.CheckedContent> <Grid> - <fa:ImageAwesome Icon="Plus" Foreground="{StaticResource TangoDarkForegroundBrush}" Width="10" Height="10" /> + <fa:ImageAwesome Icon="Plus" Foreground="{StaticResource TangoExpanderIconForegroundBrush}" Width="10" Height="10" /> </Grid> </local:TouchToggleButton> diff --git a/Software/Visual_Studio/Tango.Touch/Controls/TouchTable.cs b/Software/Visual_Studio/Tango.Touch/Controls/TouchTable.cs new file mode 100644 index 000000000..3783c5bea --- /dev/null +++ b/Software/Visual_Studio/Tango.Touch/Controls/TouchTable.cs @@ -0,0 +1,31 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Controls; + +namespace Tango.Touch.Controls +{ + public class TouchTable : Grid + { + public GridLength RowHeight + { + get { return (GridLength)GetValue(RowHeightProperty); } + set { SetValue(RowHeightProperty, value); } + } + public static readonly DependencyProperty RowHeightProperty = + DependencyProperty.Register("RowHeight", typeof(GridLength), typeof(TouchTable), new FrameworkPropertyMetadata(new GridLength(1, GridUnitType.Star), FrameworkPropertyMetadataOptions.AffectsRender)); + + public TouchTable() + { + this.Loaded += TouchTable_Loaded; + } + + private void TouchTable_Loaded(object sender, RoutedEventArgs e) + { + throw new NotImplementedException(); + } + } +} diff --git a/Software/Visual_Studio/Tango.Touch/Controls/TouchTextBox.xaml b/Software/Visual_Studio/Tango.Touch/Controls/TouchTextBox.xaml index d49f8799e..c463b5277 100644 --- a/Software/Visual_Studio/Tango.Touch/Controls/TouchTextBox.xaml +++ b/Software/Visual_Studio/Tango.Touch/Controls/TouchTextBox.xaml @@ -20,6 +20,7 @@ </ResourceDictionary.MergedDictionaries> <Style TargetType="{x:Type local:TouchTextBox}"> + <Setter Property="Foreground" Value="{StaticResource TangoDarkForegroundBrush}"></Setter> <Setter Property="Focusable" Value="False"></Setter> <Setter Property="FocusVisualStyle" Value="{x:Null}"></Setter> <Setter Property="keyboard:KeyboardView.Mode" Value="{Binding RelativeSource={RelativeSource Self},Path=KeyboardMode}"></Setter> @@ -98,8 +99,8 @@ <Grid> <components:Ripple RippleBrush="{StaticResource TangoRippleDarkBrush}" RippleFactor="15"> <Grid> - <TextBox Padding="0 0 0 4" CaretBrush="{StaticResource TangoPrimaryAccentBrush}" FocusVisualStyle="{x:Null}" x:Name="PART_TextBox" Text="{Binding RelativeSource={RelativeSource AncestorType=local:TouchTextBox},Path=Text,UpdateSourceTrigger=PropertyChanged}" BorderThickness="0" Background="Transparent" Visibility="{Binding RelativeSource={RelativeSource AncestorType=local:TouchTextBox},Path=IsPassword,Converter={StaticResource BooleanToVisibilityInverseConverter}}"></TextBox> - <PasswordBox helpers:PasswordHelper.Attach="True" helpers:PasswordHelper.Password="{Binding RelativeSource={RelativeSource AncestorType=local:TouchTextBox},Path=Text,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Padding="0 0 0 4" CaretBrush="{StaticResource TangoPrimaryAccentBrush}" FocusVisualStyle="{x:Null}" x:Name="PART_PasswordBox" BorderThickness="0" Background="Transparent" Visibility="{Binding RelativeSource={RelativeSource AncestorType=local:TouchTextBox},Path=IsPassword,Converter={StaticResource BooleanToVisibilityConverter}}"></PasswordBox> + <TextBox Foreground="{TemplateBinding Foreground}" Padding="0 0 0 4" CaretBrush="{StaticResource TangoPrimaryAccentBrush}" FocusVisualStyle="{x:Null}" x:Name="PART_TextBox" Text="{Binding RelativeSource={RelativeSource AncestorType=local:TouchTextBox},Path=Text,UpdateSourceTrigger=PropertyChanged}" BorderThickness="0" Background="Transparent" Visibility="{Binding RelativeSource={RelativeSource AncestorType=local:TouchTextBox},Path=IsPassword,Converter={StaticResource BooleanToVisibilityInverseConverter}}"></TextBox> + <PasswordBox Foreground="{TemplateBinding Foreground}" helpers:PasswordHelper.Attach="True" helpers:PasswordHelper.Password="{Binding RelativeSource={RelativeSource AncestorType=local:TouchTextBox},Path=Text,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Padding="0 0 0 4" CaretBrush="{StaticResource TangoPrimaryAccentBrush}" FocusVisualStyle="{x:Null}" x:Name="PART_PasswordBox" BorderThickness="0" Background="Transparent" Visibility="{Binding RelativeSource={RelativeSource AncestorType=local:TouchTextBox},Path=IsPassword,Converter={StaticResource BooleanToVisibilityConverter}}"></PasswordBox> <TextBlock IsHitTestVisible="False" Text="{TemplateBinding Watermark}" Foreground="{StaticResource TangoTextWatermarkBrush}"> <TextBlock.Style> <Style TargetType="TextBlock"> diff --git a/Software/Visual_Studio/Tango.Touch/Resources/Colors.xaml b/Software/Visual_Studio/Tango.Touch/Resources/Colors.xaml index 11da08e69..75c68c749 100644 --- a/Software/Visual_Studio/Tango.Touch/Resources/Colors.xaml +++ b/Software/Visual_Studio/Tango.Touch/Resources/Colors.xaml @@ -10,8 +10,8 @@ <Color x:Key="TangoMidAccentColor">#4e556f</Color> <Color x:Key="TangoLowAccentColor">#40455F</Color> <Color x:Key="TangoLowerAccentColor">#404554</Color> - - <Color x:Key="TangoDarkForegroundColor">#2f2f2f</Color> + + <Color x:Key="TangoDarkForegroundColor">#3b3e4a</Color> <Color x:Key="TangoLightForegroundColor">#FFFFFF</Color> <Color x:Key="TangoDividerColor">#c8cbd4</Color> @@ -31,7 +31,12 @@ <Color x:Key="TangoValidationErrorColor">Red</Color> - <Color x:Key="TangoExpanderIconColor">#C5C5C6</Color> + <Color x:Key="TangoExpanderIconBackgroundColor">#f1f1f1</Color> + <Color x:Key="TangoExpanderIconForegroundColor">#55565a</Color> + + <Color x:Key="TangoDropShadowColor">#dbe0e8</Color> + + <Color x:Key="TangoGrayTextColor">#7e818b</Color> <!--Brushes--> <SolidColorBrush x:Key="TangoPrimaryBackgroundBrush" Color="{StaticResource TangoPrimaryBackgroundColor}"></SolidColorBrush> @@ -62,5 +67,10 @@ <SolidColorBrush x:Key="TangoValidationErrorBrush" Color="{StaticResource TangoValidationErrorColor}"></SolidColorBrush> - <SolidColorBrush x:Key="TangoExpanderIconBrush" Color="{StaticResource TangoExpanderIconColor}"></SolidColorBrush> + <SolidColorBrush x:Key="TangoExpanderIconBackgroundBrush" Color="{StaticResource TangoExpanderIconBackgroundColor}"></SolidColorBrush> + <SolidColorBrush x:Key="TangoExpanderIconForegroundBrush" Color="{StaticResource TangoExpanderIconForegroundColor}"></SolidColorBrush> + + <SolidColorBrush x:Key="TangoDropShadowBrush" Color="{StaticResource TangoDropShadowColor}"></SolidColorBrush> + + <SolidColorBrush x:Key="TangoGrayTextBrush" Color="{StaticResource TangoGrayTextColor}"></SolidColorBrush> </ResourceDictionary>
\ No newline at end of file diff --git a/Software/Visual_Studio/Tango.Touch/Resources/Fonts.xaml b/Software/Visual_Studio/Tango.Touch/Resources/Fonts.xaml index cd2e0ea58..e10072259 100644 --- a/Software/Visual_Studio/Tango.Touch/Resources/Fonts.xaml +++ b/Software/Visual_Studio/Tango.Touch/Resources/Fonts.xaml @@ -6,4 +6,6 @@ <sys:Double x:Key="TangoMessageBoxTitleFontSize">30</sys:Double> <sys:Double x:Key="TangoMessageBoxMessageFontSize">20</sys:Double> + <sys:Double x:Key="TangoExpanderHeaderFontSize">23</sys:Double> + </ResourceDictionary>
\ No newline at end of file diff --git a/Software/Visual_Studio/Tango.Touch/Tango.Touch.csproj b/Software/Visual_Studio/Tango.Touch/Tango.Touch.csproj index e4e1ec09f..15566b31c 100644 --- a/Software/Visual_Studio/Tango.Touch/Tango.Touch.csproj +++ b/Software/Visual_Studio/Tango.Touch/Tango.Touch.csproj @@ -66,6 +66,7 @@ <Compile Include="Controls\TouchInput.cs" /> <Compile Include="Controls\TouchListBox.cs" /> <Compile Include="Controls\TouchListBoxItem.cs" /> + <Compile Include="Controls\TouchTable.cs" /> <Compile Include="Controls\TouchTextBox.cs" /> <Compile Include="Controls\TouchPanel.cs" /> <Compile Include="Converters\StringToPasswordConverter.cs" /> |
