aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Tango.Touch
diff options
context:
space:
mode:
authorRoy Ben-Shabat <Roy@Twine-s.com>2019-11-27 19:10:18 +0200
committerRoy Ben-Shabat <Roy@Twine-s.com>2019-11-27 19:10:18 +0200
commit3f22291740c0ac631a655495f6198dbf18be2de2 (patch)
tree3a5106dfc6258b5a30dce8e26f78a65b0b7a87d3 /Software/Visual_Studio/Tango.Touch
parentca29510e1e336c4d68aaa926cfea6eb72ce42779 (diff)
downloadTango-3f22291740c0ac631a655495f6198dbf18be2de2.tar.gz
Tango-3f22291740c0ac631a655495f6198dbf18be2de2.zip
A lot of work !!!
Diffstat (limited to 'Software/Visual_Studio/Tango.Touch')
-rw-r--r--Software/Visual_Studio/Tango.Touch/Controls/TouchKeyboardContainer.cs13
-rw-r--r--Software/Visual_Studio/Tango.Touch/Controls/TouchMultiLineTextBox.cs28
-rw-r--r--Software/Visual_Studio/Tango.Touch/Controls/TouchMultiLineTextBox.xaml43
-rw-r--r--Software/Visual_Studio/Tango.Touch/Tango.Touch.csproj8
-rw-r--r--Software/Visual_Studio/Tango.Touch/Themes/Generic.xaml1
5 files changed, 92 insertions, 1 deletions
diff --git a/Software/Visual_Studio/Tango.Touch/Controls/TouchKeyboardContainer.cs b/Software/Visual_Studio/Tango.Touch/Controls/TouchKeyboardContainer.cs
new file mode 100644
index 000000000..044791e4b
--- /dev/null
+++ b/Software/Visual_Studio/Tango.Touch/Controls/TouchKeyboardContainer.cs
@@ -0,0 +1,13 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Controls;
+
+namespace Tango.Touch.Controls
+{
+ public class TouchKeyboardContainer : Grid
+ {
+ }
+}
diff --git a/Software/Visual_Studio/Tango.Touch/Controls/TouchMultiLineTextBox.cs b/Software/Visual_Studio/Tango.Touch/Controls/TouchMultiLineTextBox.cs
new file mode 100644
index 000000000..f3c554a8c
--- /dev/null
+++ b/Software/Visual_Studio/Tango.Touch/Controls/TouchMultiLineTextBox.cs
@@ -0,0 +1,28 @@
+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 TouchMultiLineTextBox : TextBox
+ {
+ public CornerRadius CornerRadius
+ {
+ get { return (CornerRadius)GetValue(CornerRadiusProperty); }
+ set { SetValue(CornerRadiusProperty, value); }
+ }
+ public static readonly DependencyProperty CornerRadiusProperty =
+ DependencyProperty.Register("CornerRadius", typeof(CornerRadius), typeof(TouchMultiLineTextBox), new PropertyMetadata(new CornerRadius(0)));
+
+
+
+ static TouchMultiLineTextBox()
+ {
+ DefaultStyleKeyProperty.OverrideMetadata(typeof(TouchMultiLineTextBox), new FrameworkPropertyMetadata(typeof(TouchMultiLineTextBox)));
+ }
+ }
+}
diff --git a/Software/Visual_Studio/Tango.Touch/Controls/TouchMultiLineTextBox.xaml b/Software/Visual_Studio/Tango.Touch/Controls/TouchMultiLineTextBox.xaml
new file mode 100644
index 000000000..494e7442e
--- /dev/null
+++ b/Software/Visual_Studio/Tango.Touch/Controls/TouchMultiLineTextBox.xaml
@@ -0,0 +1,43 @@
+<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ xmlns:keyboard="clr-namespace:Tango.Touch.Keyboard"
+ xmlns:local="clr-namespace:Tango.Touch.Controls">
+
+ <ResourceDictionary.MergedDictionaries>
+ <ResourceDictionary Source="../Resources/Colors.xaml" />
+ </ResourceDictionary.MergedDictionaries>
+
+
+ <Style TargetType="{x:Type local:TouchMultiLineTextBox}">
+ <Setter Property="FocusVisualStyle" Value="{x:Null}"></Setter>
+ <Setter Property="BorderBrush" Value="{StaticResource TangoDividerBrush}"></Setter>
+ <Setter Property="Foreground" Value="{StaticResource TangoDarkForegroundBrush}"></Setter>
+ <Setter Property="AcceptsReturn" Value="True"></Setter>
+ <Setter Property="TextWrapping" Value="Wrap"></Setter>
+ <Setter Property="Height" Value="60"></Setter>
+ <Setter Property="Padding" Value="5"></Setter>
+ <Setter Property="CornerRadius" Value="3"></Setter>
+ <Setter Property="BorderThickness" Value="1"></Setter>
+ <Setter Property="keyboard:KeyboardView.Mode" Value="AlphaNumeric"></Setter>
+ <Setter Property="Template">
+ <Setter.Value>
+ <ControlTemplate TargetType="{x:Type local:TouchMultiLineTextBox}">
+ <Border x:Name="border" CornerRadius="{TemplateBinding CornerRadius}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" SnapsToDevicePixels="True">
+ <ScrollViewer x:Name="PART_ContentHost" Focusable="false" HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Hidden"/>
+ </Border>
+ <ControlTemplate.Triggers>
+ <Trigger Property="IsEnabled" Value="false">
+ <Setter Property="Opacity" TargetName="border" Value="0.56"/>
+ </Trigger>
+ <Trigger Property="IsMouseOver" Value="true">
+ <Setter Property="BorderBrush" TargetName="border" Value="{StaticResource TangoDarkForegroundBrush}"/>
+ </Trigger>
+ <Trigger Property="IsKeyboardFocused" Value="true">
+ <Setter Property="BorderBrush" TargetName="border" Value="{StaticResource TangoDarkForegroundBrush}"/>
+ </Trigger>
+ </ControlTemplate.Triggers>
+ </ControlTemplate>
+ </Setter.Value>
+ </Setter>
+ </Style>
+</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 60817f8f8..fa3489883 100644
--- a/Software/Visual_Studio/Tango.Touch/Tango.Touch.csproj
+++ b/Software/Visual_Studio/Tango.Touch/Tango.Touch.csproj
@@ -81,8 +81,10 @@
<Compile Include="Controls\TouchIconKind.cs" />
<Compile Include="Controls\TouchImageButton.cs" />
<Compile Include="Controls\TouchInput.cs" />
+ <Compile Include="Controls\TouchKeyboardContainer.cs" />
<Compile Include="Controls\TouchListBox.cs" />
<Compile Include="Controls\TouchListBoxItem.cs" />
+ <Compile Include="Controls\TouchMultiLineTextBox.cs" />
<Compile Include="Controls\TouchNativeListBox.cs" />
<Compile Include="Controls\TouchNumericTextBox.cs" />
<Compile Include="Controls\TouchProgressBar.cs" />
@@ -166,6 +168,10 @@
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
+ <Page Include="Controls\TouchMultiLineTextBox.xaml">
+ <SubType>Designer</SubType>
+ <Generator>MSBuild:Compile</Generator>
+ </Page>
<Page Include="Controls\TouchNativeListBox.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
@@ -410,7 +416,7 @@
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<ProjectExtensions>
<VisualStudio>
- <UserProperties BuildVersion_StartDate="2000/1/1" BuildVersion_UseGlobalSettings="False" BuildVersion_BuildVersioningStyle="None.None.Increment.TimeStamp" BuildVersion_UpdateAssemblyVersion="True" BuildVersion_AssemblyInfoFilename="Properties\AssemblyInfo.cs" />
+ <UserProperties BuildVersion_AssemblyInfoFilename="Properties\AssemblyInfo.cs" BuildVersion_UpdateAssemblyVersion="True" BuildVersion_BuildVersioningStyle="None.None.Increment.TimeStamp" BuildVersion_UseGlobalSettings="False" BuildVersion_StartDate="2000/1/1" />
</VisualStudio>
</ProjectExtensions>
</Project> \ No newline at end of file
diff --git a/Software/Visual_Studio/Tango.Touch/Themes/Generic.xaml b/Software/Visual_Studio/Tango.Touch/Themes/Generic.xaml
index f5b8f3caa..1c13a1aab 100644
--- a/Software/Visual_Studio/Tango.Touch/Themes/Generic.xaml
+++ b/Software/Visual_Studio/Tango.Touch/Themes/Generic.xaml
@@ -47,6 +47,7 @@
<ResourceDictionary Source="pack://application:,,,/Tango.Touch;component/Controls/TouchVirtualizedContentControl.xaml" />
<ResourceDictionary Source="pack://application:,,,/Tango.Touch;component/Controls/TouchDropShadowBorder.xaml" />
<ResourceDictionary Source="pack://application:,,,/Tango.Touch;component/Controls/TouchSimpleDataGrid.xaml" />
+ <ResourceDictionary Source="pack://application:,,,/Tango.Touch;component/Controls/TouchMultiLineTextBox.xaml" />
<ResourceDictionary Source="pack://application:,,,/Tango.Touch;component/Controls/TouchToggleImageButton.xaml" />