View Issue Details

IDProjectCategoryView StatusLast Update
0001979NoesisGUIC++ SDKpublic2021-04-29 11:11
ReporterSusanna.Rowland Assigned Tosfernandez  
PrioritynormalSeveritymajor 
Status resolvedResolutionfixed 
Product Version3.0.11 
Target Version3.0.12Fixed in Version3.0.12 
Summary0001979: TabControl focus inconsistent with WPF standard
Description

In WPF, when a TabControl is focused, the focus is passed to the first focusable child element in the tab item, by default. With Noesis, the tab itself is visibly gaining focus, not the first child. This occurs both when you use the mouse or keyboard controls (ctrl-tab).
In addition, use of FocusManager.FocusedElement as a workaround appears to be being ignored/overridden.

Steps To Reproduce

Launch Noesis with the attached XAML (based of the Noesis Commands sample).
Observe that the selected tab contents does not receive focus on start.
Switch tabs using the keyboard shortcuts (ctrl+tab & ctrl+shift+tab) and observe the tab holds focus and does not pass it to the first child element.
Switch tabs using the mouse and again observe the tab holds focus and does not pass it to the first child element.

Attached Files
MainWindow.xaml (2,976 bytes)   
<Window x:Class="Commands.MainWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    FontFamily="./#Aero Matics"
    Foreground="Silver"
    FontSize="24"
    Title="NoesisGUI - Commands">

    <Window.Background>
        <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
            <GradientStop Offset="0" Color="#FF184C79"/>
            <GradientStop Offset="0.05" Color="#FF1B5688"/>
            <GradientStop Offset="1" Color="#FF123859"/>
        </LinearGradientBrush>
    </Window.Background>

    <TabControl x:Name="Tabs" FocusManager.FocusedElement="{Binding ElementName=helloBtn}">
        <TabItem x:Name="TabA" Header="A">
            <Viewbox>
                <Border x:Name="myBorder" Width="400" Margin="50"
                Background="#801C1F21" BorderThickness="1" CornerRadius="5" BorderBrush="#40101611" Padding="5"
                HorizontalAlignment="Center" VerticalAlignment="Center">
                    <StackPanel Orientation="Vertical">
                        <StackPanel Orientation="Horizontal" Margin="3">
                            <TextBlock Text="  Input:" Width="90" VerticalAlignment="Center"/>
                            <TextBox Text="{Binding Input, Mode=TwoWay}" MinWidth="280"/>
                        </StackPanel>
                        <StackPanel Orientation="Horizontal" Margin="3">
                            <TextBlock Text="  Param:" Width="90" VerticalAlignment="Center"/>
                            <TextBox x:Name="Param" Text="" MinWidth="280"/>
                        </StackPanel>
                        <Button x:Name="helloBtn" Content="Say Hello" Margin="3" Command="{Binding SayHelloCommand}"
                        CommandParameter="{Binding Text, ElementName=Param}" FontSize="28" />
                        <Button x:Name="helloBtn2" Content="Say Hello" Margin="3" Command="{Binding SayHelloCommand}"
                        CommandParameter="{Binding Text, ElementName=Param}" FontSize="28" />
                        <Viewbox Margin="5" Height="50">
                            <TextBlock Margin="5" Padding="0" TextAlignment="Center" Text="{Binding Output}"
                            FontSize="28" Foreground="White"/>
                        </Viewbox>
                    </StackPanel>
                </Border>
            </Viewbox>
        </TabItem>
        <TabItem Header="B">
            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition/>
                    <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <Button Content="TestB" HorizontalAlignment="Center" VerticalAlignment="Center" />
                <Button Content="TestB" HorizontalAlignment="Center" VerticalAlignment="Center" Grid.Column="1" />
            </Grid>
        </TabItem>
    </TabControl>

</Window>
MainWindow.xaml (2,976 bytes)   
PlatformAny

Relationships

related to 0001982 resolvedsfernandez FocusManager is missing 

Activities

sfernandez

sfernandez

2021-04-29 11:11

manager   ~0007189

We fixed the differences in behavior with WPF when using mouse and keyboard/gamepad to move the focus.
I'm going to close this ticket leaving the FocusManager issue for ticket 0001982.

Issue History

Date Modified Username Field Change
2021-04-23 18:09 Susanna.Rowland New Issue
2021-04-23 18:09 Susanna.Rowland Tag Attached: C++
2021-04-23 18:09 Susanna.Rowland Tag Attached: Focus
2021-04-23 18:09 Susanna.Rowland Tag Attached: TabControl
2021-04-23 18:09 Susanna.Rowland File Added: MainWindow.xaml
2021-04-26 13:43 jsantos Assigned To => sfernandez
2021-04-26 13:43 jsantos Status new => assigned
2021-04-26 13:44 jsantos Target Version => 3.0.12
2021-04-26 13:44 jsantos Description Updated
2021-04-26 13:44 jsantos Steps to Reproduce Updated
2021-04-28 11:21 jsantos Product Version => 3.0.11
2021-04-29 10:32 sfernandez Relationship added related to 0001982
2021-04-29 11:11 sfernandez Status assigned => resolved
2021-04-29 11:11 sfernandez Resolution open => fixed
2021-04-29 11:11 sfernandez Fixed in Version => 3.0.12
2021-04-29 11:11 sfernandez Note Added: 0007189