Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wpf: Improve keyboard navigation for FeatureForms #567

Merged
merged 1 commit into from
Apr 7, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
</ControlTemplate>
</Setter.Value>
</Setter>
<Setter Property="KeyboardNavigation.IsTabStop" Value="False" />
</Style>
<Style TargetType="{x:Type primitives:DateTimePickerFormInputView}">
<Setter Property="Template">
Expand All @@ -43,6 +44,7 @@
</ControlTemplate>
</Setter.Value>
</Setter>
<Setter Property="KeyboardNavigation.IsTabStop" Value="False" />
</Style>
<Style TargetType="{x:Type primitives:SwitchFormInputView}">
<Setter Property="Template">
Expand Down Expand Up @@ -89,6 +91,7 @@
</ControlTemplate>
</Setter.Value>
</Setter>
<Setter Property="KeyboardNavigation.IsTabStop" Value="False" />
</Style>
<Style TargetType="{x:Type primitives:RadioButtonsFormInputView}">
<Setter Property="ItemsPanel">
Expand All @@ -112,6 +115,7 @@
</ControlTemplate>
</Setter.Value>
</Setter>
<Setter Property="KeyboardNavigation.IsTabStop" Value="False" />
</Style>
<Style TargetType="{x:Type primitives:TextFormInputView}">
<Setter Property="Template">
Expand Down Expand Up @@ -175,6 +179,7 @@
</ControlTemplate>
</Setter.Value>
</Setter>
<Setter Property="KeyboardNavigation.IsTabStop" Value="False" />
</Style>
<Style TargetType="{x:Type primitives:FieldFormElementView}" >
<Setter Property="Margin" Value="{StaticResource FeatureFormElementInputMargin}" />
Expand Down Expand Up @@ -225,7 +230,7 @@
<ControlTemplate TargetType="{x:Type primitives:FieldFormElementView}">
<StackPanel>
<TextBlock Text="{Binding Label}" Style="{StaticResource FeatureFormViewTitleStyle}"/>
<ContentControl Margin="0,3" Foreground="Gray" Content="{Binding}" x:Name="FieldInput">
<ContentControl Margin="0,3" Foreground="Gray" Content="{Binding}" x:Name="FieldInput" KeyboardNavigation.IsTabStop="False">
<ContentControl.ToolTip>
<ToolTip Content="{Binding Hint}">
<ToolTip.Style>
Expand All @@ -249,6 +254,7 @@
</ControlTemplate>
</Setter.Value>
</Setter>
<Setter Property="KeyboardNavigation.IsTabStop" Value="False" />
</Style>

<Style x:Key="GroupFormElementExpanderButtonStyle" TargetType="{x:Type ToggleButton}">
Expand Down Expand Up @@ -378,7 +384,7 @@
<TextBlock Text="{Binding Title}" Style="{StaticResource FeatureFormViewHeaderStyle}"
Visibility="{Binding Title, Converter={StaticResource FeatureFormViewVisibilityConverter}}" />
<ScrollViewer VerticalScrollBarVisibility="{TemplateBinding VerticalScrollBarVisibility}" Grid.Row="1" x:Name="FeatureFormContentScrollViewer">
<primitives:FormElementItemsControl ItemsSource="{Binding Elements}" Margin="0,10" x:Name="ItemsView">
<primitives:FormElementItemsControl ItemsSource="{Binding Elements}" Margin="0,10" x:Name="ItemsView" KeyboardNavigation.IsTabStop="False">
<primitives:FormElementItemsControl.FieldFormElementTemplate>
<DataTemplate>
<primitives:FieldFormElementView Element="{Binding}" FeatureForm="{Binding FeatureForm, RelativeSource={RelativeSource AncestorType=controls:FeatureFormView}}" />
Expand All @@ -394,7 +400,7 @@
<TextBlock Text="{Binding Description}" Visibility="{Binding Description, Converter={StaticResource FeatureFormViewVisibilityConverter}}" Style="{StaticResource FeatureFormViewCaptionStyle}" />
</StackPanel>
</Expander.Header>
<primitives:FormElementItemsControl ItemsSource="{Binding Elements}" Margin="0,10" >
<primitives:FormElementItemsControl ItemsSource="{Binding Elements}" Margin="0,10" KeyboardNavigation.IsTabStop="False">
<primitives:FormElementItemsControl.FieldFormElementTemplate>
<DataTemplate>
<primitives:FieldFormElementView Element="{Binding}" FeatureForm="{Binding FeatureForm, RelativeSource={RelativeSource AncestorType=controls:FeatureFormView}}" />
Expand Down