Page 1 of 1

MouseUp on "empty" Border/Grid does not fire

Posted: 20 Jun 2016, 13:20
by Verfin
Noesis seems to have a different behaviour than wpf when it comes to visually empty containers:
<Border BorderBrush="Black" BorderThickness="1" MouseUp="Border_MouseUp">
    <Grid MouseUp="Border_MouseUp">
        <TextBlock />
    </Grid>
 </Border>
in wpf the Border_MouseUp fires when the area contained by grid/border is clicked but in Noesis it doesn't. Only when the Textblock actually has text does the event fire as it should. Assigning text and then hiding the textblock doesn't work either.

Is there a way around this, or do I have to make a "ghost" textblock and set its margin to -9999?

Re: MouseUp on "empty" Border/Grid does not fire

Posted: 20 Jun 2016, 13:29
by ai_enabled
Hello!

Hit testing is produced only on controls with a background - the same behaviour as WPF.
If you set Background="Transparent" for the border it will resolve the issue.

It seems the NoesisGUI Border default style uses Background="{x:Null}" - so hit testing is not working by default (mouse down/up events are missing when you click on empty space of the border).

Regards!