View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0001222 | NoesisGUI | Unity | public | 2018-01-20 04:46 | 2019-04-30 06:20 |
| Reporter | nokola | Assigned To | sfernandez | ||
| Priority | high | Severity | block | ||
| Status | closed | Resolution | fixed | ||
| Product Version | 2.1.0b17 | ||||
| Target Version | 2.2.0 | Fixed in Version | 2.2.0b6 | ||
| Summary | 0001222: VisualTreeHelper.HitTest returns element with IsHitTestVisible == false | ||||
| Description | The issue is that Noesis returns a "hit test success" for an element with IsHitTestVisible == false: | ||||
| Steps To Reproduce |
Expected: | ||||
| Platform | Any | ||||
|
A couple of questions:
<Border By default UserControl has a null Background, so its template Border shouldn't return in a hit test. Apart from that our default templates have a default Background = Transparent in the following controls: Label, RadioButton, CheckBox, ScrollViewer, ListBoxItem, MenuItem, ComboBoxItem, TreeViewItem, StatusBarItem, and ListViewItem. But these are required to properly click them with the mouse. If you can attach a minimal project where this can be reproduced we can debug it and find what is occurring. Thanks for your collaboration. |
|
|
Thanks! yes - it was a background=transparent causing the hit test to occur. Removing it canceled hit testing as well. Note that the behavior where hit testing is being ignored looks like a WPF bug: https://social.msdn.microsoft.com/Forum ... ?forum=wpf |
|
|
And yes, the Canvas is a direct logical child of the UserControl |
|
|
For completeness: |
|
|
ai_enabled has good suggestion in the forums: add a HitTest overload with boolean flag to allow IsHitTestVisible = false to work. http://www.noesisengine.com/forums/viewtopic.php?f=3&t=1170&start=90#p7473 In addition, can be mentioned somewhere in docs as "beneficial deviation from WPF behavior". |
|
|
We decided to implement in C# the callback version of the HitTest function. |
|
|
Thanks, sounds good! hopefully not too taxing on the system due to pinvoke-s (can't really tell without profiling) |
|
|
Please give higher priority to the implementation of the C# HitTest method with the callback delegate for the next update. |
|
|
Note: having a callback, while good idea, may have significant performance implications if we have to switch from managed to native code. (to be fair, I think the WPF behavior is just a bug, ideally Noesis fixes it in your implementation and you work better than WPF on this one. There's no reason why an IsHitTestVisible==false should ever hit) |
|
|
Yes, having a parameter or simply another method will be good enough for our needs. When it was discussed on the forums, I've also supported this much more efficient approach. |
|
|
Any updates on this?
|
|
|
Haven't work on this yet but is something we are going to address before releasing the final 2.2 version. |
|
|
Thanks for the fix! |
|
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2018-01-20 04:46 | nokola | New Issue | |
| 2018-01-20 04:46 | nokola | File Added: NoesisHitTestFail.jpg | |
| 2018-01-20 11:24 | sfernandez | Assigned To | => sfernandez |
| 2018-01-20 11:24 | sfernandez | Status | new => feedback |
| 2018-01-20 11:24 | sfernandez | Note Added: 0005032 | |
| 2018-01-20 11:24 | sfernandez | Note Edited: 0005032 | |
| 2018-01-20 16:47 | nokola | Note Added: 0005035 | |
| 2018-01-20 16:47 | nokola | Status | feedback => assigned |
| 2018-01-20 16:47 | nokola | Note Added: 0005036 | |
| 2018-01-20 16:48 | nokola | Note Added: 0005037 | |
| 2018-01-27 02:31 | nokola | Note Added: 0005054 | |
| 2018-01-29 14:48 | sfernandez | Note Added: 0005058 | |
| 2018-01-29 18:28 | nokola | Note Added: 0005062 | |
| 2018-06-02 08:59 | ai_enabled | Note Added: 0005213 | |
| 2018-06-02 18:28 | nokola | Note Added: 0005214 | |
| 2018-06-02 18:38 | ai_enabled | Note Added: 0005215 | |
| 2018-11-01 02:14 | jsantos | View Status | public => private |
| 2018-11-22 12:00 | sfernandez | Target Version | => 2.2.0 |
| 2018-11-22 12:00 | sfernandez | View Status | private => public |
| 2018-11-22 12:00 | sfernandez | Platform | => Any |
| 2018-12-28 13:25 | ai_enabled | Note Added: 0005379 | |
| 2018-12-31 11:21 | sfernandez | Note Added: 0005380 | |
| 2019-01-16 13:15 | sfernandez | Status | assigned => resolved |
| 2019-01-16 13:15 | sfernandez | Resolution | open => fixed |
| 2019-01-16 13:15 | sfernandez | Fixed in Version | => 2.2.0b6 |
| 2019-04-30 06:20 | nokola | Status | resolved => closed |
| 2019-04-30 06:20 | nokola | Note Added: 0005653 | |
| 2019-04-30 18:19 | sfernandez | File Deleted: NoesisHitTestFail.jpg | |
| 2025-10-10 13:29 | jsantos | Category | Unity3D => Unity |