You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When invoking the InvalidateMeasure() on a ContentView, the ContentView is not properly invalidated, i.e. its MeasureOverride() and ArrangeOverride() methods are not being invoked in WinUI. Only the Content is being invalidated, in the sample the Grid is re-measured and re-arranged.
The issue is observed only in WinUI. In Android and iOS the MeasureOverride() and ArrangeOverride() methods of the ContentView are being called.
This obstructs many custom scenarios where one needs to add custom logic to the MeasureOverride() and ArrangeOverride() of the ContentView.
Open the project in folder Maui/ContentViewNotGettingInvalidatedOnWinUI
Run the project
Place a breakpoint in the MeasureOverride() method of the CustomView class
Click the button
Expected Behavior:
The breakpoint should get hit.
If debugging isn't available to you, it is expected that in the Debug Output a message is displayed saying that the ContentView was measured and arranged.
Expected debug output:
::: CustomView: will MeasureOverride
::: MyGrid: will MeasureOverride
::: CustomView: will ArrangeOverride
::: MyGrid: will ArrangeOverride
Actual Behavior:
The ContentView is not getting invalidated, i.e. the breakpoint is not getting hit.
There is no information in the Debug Output that the MeasureOverride() and ArrangeOverride() of the ContentView methods were called.
Actual debug output:
::: MyGrid: will MeasureOverride
::: MyGrid: will ArrangeOverride
Description
When invoking the InvalidateMeasure() on a ContentView, the ContentView is not properly invalidated, i.e. its MeasureOverride() and ArrangeOverride() methods are not being invoked in WinUI. Only the Content is being invalidated, in the sample the Grid is re-measured and re-arranged.
The issue is observed only in WinUI. In Android and iOS the MeasureOverride() and ArrangeOverride() methods of the ContentView are being called.
This obstructs many custom scenarios where one needs to add custom logic to the MeasureOverride() and ArrangeOverride() of the ContentView.
Steps to Reproduce
Expected Behavior:
The breakpoint should get hit.
If debugging isn't available to you, it is expected that in the Debug Output a message is displayed saying that the ContentView was measured and arranged.
Expected debug output:
::: CustomView: will MeasureOverride
::: MyGrid: will MeasureOverride
::: CustomView: will ArrangeOverride
::: MyGrid: will ArrangeOverride
Actual Behavior:
The ContentView is not getting invalidated, i.e. the breakpoint is not getting hit.
There is no information in the Debug Output that the MeasureOverride() and ArrangeOverride() of the ContentView methods were called.
Actual debug output:
::: MyGrid: will MeasureOverride
::: MyGrid: will ArrangeOverride
Link to public reproduction project repository
https://github.com/telerik/ms-samples/tree/main/Maui/ContentViewNotGettingInvalidatedOnWinUI
Version with bug
9.0.0 GA
Is this a regression from previous behavior?
Not sure, did not test other versions
Last version that worked well
Unknown/Other
Affected platforms
Windows
Affected platform versions
No response
Did you find any workaround?
I was unable to find a workaround.
Relevant log output
The text was updated successfully, but these errors were encountered: