View Issue Details

IDProjectCategoryView StatusLast Update
0003969NoesisGUIC++ SDKpublic2025-02-28 10:46
ReporterAnKor Assigned Tosfernandez  
PrioritynormalSeverityminor 
Status resolvedResolutionfixed 
Product Version3.2.7 
Target Version3.2.8Fixed in Version3.2.8 
Summary0003969: TextBlock with inlines has unexpected hit test and IsEnabled behavior
Description

Related thread: https://www.noesisengine.com/forums/viewtopic.php?t=3587

I'm observing two oddities when TextBlock has inlines:

  1. TextElement can be returned by VisualTreeHelper::HitTest
  2. MouseOver trigger can fire if the mouse is over TextElement whose parent is disabled.

Neither of this happens in WPF and there's no obvious workaround for the second issue.

Steps To Reproduce

Moving the mouse over white letters invokes a trigger even though the TextBlock is disabled.

    <TextBlock Width="400" Height="200" IsEnabled="False">
        <Span Foreground="White" FontSize="50">Mouse over text</Span>
        <TextBlock.Style>
            <Style TargetType="TextBlock">
                <Setter Property="Background" Value="Green"/>
                <Style.Triggers>
                    <Trigger Property="IsMouseOver" Value="True">
                        <Setter Property="Background" Value="Blue"/>
                    </Trigger>
                </Style.Triggers>
            </Style>
        </TextBlock.Style>
    </TextBlock>
PlatformAny

Activities

sfernandez

sfernandez

2025-02-19 10:38

manager   ~0010373

I just checked and the IsEnabled bug is also happening without inlines defined, just a simple Text in the TextBlock will reproduce the issue too. I'll take a look.

sfernandez

sfernandez

2025-02-28 10:46

manager   ~0010384

We solved the issue with the IsEnabled being ignored, but we won't change the VisualTreeHelper::HitTest behavior because we require it to implement the click and over states on inlines like Hyperlink. If this is a problem for you please open a new ticket and we will see how we can get around that.

Issue History

Date Modified Username Field Change
2025-02-17 21:39 AnKor New Issue
2025-02-18 11:44 sfernandez Assigned To => sfernandez
2025-02-18 11:44 sfernandez Status new => assigned
2025-02-18 11:44 sfernandez Product Version => 3.2.7
2025-02-18 11:44 sfernandez Target Version => 3.2.8
2025-02-19 10:38 sfernandez Status assigned => feedback
2025-02-19 10:38 sfernandez Note Added: 0010373
2025-02-28 10:46 sfernandez Status feedback => resolved
2025-02-28 10:46 sfernandez Resolution open => fixed
2025-02-28 10:46 sfernandez Fixed in Version => 3.2.8
2025-02-28 10:46 sfernandez Note Added: 0010384