diff options
| author | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-06-19 17:08:43 +0300 |
|---|---|---|
| committer | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-06-19 17:08:43 +0300 |
| commit | 0eca640aa38c5697739f66d1b3e565d46e615b78 (patch) | |
| tree | ec68e302b44ed4f2e624b49caf0d3977a60a867c /Software/Visual_Studio/Tango.Touch/Controls/TouchTextBox.xaml | |
| parent | 1db87b6d19c6148351b37a32e8ff2b127768e945 (diff) | |
| download | Tango-0eca640aa38c5697739f66d1b3e565d46e615b78.tar.gz Tango-0eca640aa38c5697739f66d1b3e565d46e615b78.zip | |
Improved Keyboard View.
Applies TouchPanel to PPC.
Implemented LoginView for PPC.
Diffstat (limited to 'Software/Visual_Studio/Tango.Touch/Controls/TouchTextBox.xaml')
| -rw-r--r-- | Software/Visual_Studio/Tango.Touch/Controls/TouchTextBox.xaml | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/Software/Visual_Studio/Tango.Touch/Controls/TouchTextBox.xaml b/Software/Visual_Studio/Tango.Touch/Controls/TouchTextBox.xaml index a4d264636..ec26d882e 100644 --- a/Software/Visual_Studio/Tango.Touch/Controls/TouchTextBox.xaml +++ b/Software/Visual_Studio/Tango.Touch/Controls/TouchTextBox.xaml @@ -21,15 +21,16 @@ <Style TargetType="{x:Type local:TouchTextBox}"> <Setter Property="Focusable" Value="False"></Setter> - <Setter Property="keyboard:KeyboardView.Mode" Value="AlphaNumeric"></Setter> - <Setter Property="keyboard:KeyboardView.Action" Value="Tab"></Setter> + <Setter Property="keyboard:KeyboardView.Mode" Value="{Binding RelativeSource={RelativeSource Self},Path=KeyboardMode}"></Setter> + <Setter Property="keyboard:KeyboardView.Action" Value="{Binding RelativeSource={RelativeSource Self},Path=KeyboardAction}"></Setter> + <Setter Property="keyboard:KeyboardView.Container" Value="{Binding RelativeSource={RelativeSource Self},Path=KeyboardContainer}"></Setter> <Setter Property="Validation.ErrorTemplate" Value="{x:Null}"></Setter> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type local:TouchTextBox}"> <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" - BorderThickness="{TemplateBinding BorderThickness}"> + BorderThickness="{TemplateBinding BorderThickness}" keyboard:KeyboardView.Container="{TemplateBinding KeyboardContainer}"> <DockPanel> <Border DockPanel.Dock="Bottom" Visibility="{Binding RelativeSource={RelativeSource AncestorType=local:TouchTextBox},Path=(Validation.HasError),Converter={StaticResource BooleanToVisibilityConverter}}"> <TextBlock FontSize="12" Foreground="{StaticResource TangoValidationErrorBrush}" Margin="0 5 0 0" TextWrapping="Wrap" Text="{Binding RelativeSource={RelativeSource AncestorType=local:TouchTextBox},Path=(Validation.Errors).CurrentItem.ErrorContent}"></TextBlock> @@ -96,8 +97,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" keyboard:KeyboardView.Mode="{TemplateBinding keyboard:KeyboardView.Mode}" keyboard:KeyboardView.Action="{TemplateBinding keyboard:KeyboardView.Action}" 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" keyboard:KeyboardView.Mode="{TemplateBinding keyboard:KeyboardView.Mode}" keyboard:KeyboardView.Action="{TemplateBinding keyboard:KeyboardView.Action}" BorderThickness="0" Background="Transparent" Visibility="{Binding RelativeSource={RelativeSource AncestorType=local:TouchTextBox},Path=IsPassword,Converter={StaticResource BooleanToVisibilityConverter}}"></PasswordBox> + <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> <TextBlock IsHitTestVisible="False" Text="{TemplateBinding Watermark}" Foreground="{StaticResource TangoTextWatermarkBrush}"> <TextBlock.Style> <Style TargetType="TextBlock"> |
