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
But unfortunately, there is a difference between headless platform and actual running app.
In headless test app, after MenuFlyoutPresenter attached to logical tree, the three menu items are already LogicalChildren of the MenuFlyoutPresenter, but actually no, which leads to the failure of adding them to radio groups.
In fact, there is a very generic issue, developers do not have any clue when are ItemsControl's items materialized inside PanelRoot.
rabbitism
changed the title
MenuItem (Radio) is not allocated in GroupManager property on first appearance.
MenuItem (Radio) is not allocated in GroupManager properly on first appearance.
Nov 22, 2024
Describe the bug
As described in title.
To Reproduce
Add below code in sandbox and click on third menu item. You will see both 1 and 3 are checked.
Expected behavior
Only third is checked.
Avalonia version
latest master
OS
Windows
Additional context
Actually this is a test case covered in unit test
Avalonia/tests/Avalonia.Controls.UnitTests/MenuItemTests.cs
Lines 485 to 523 in ed0cc75
But unfortunately, there is a difference between headless platform and actual running app.
In headless test app, after MenuFlyoutPresenter attached to logical tree, the three menu items are already LogicalChildren of the MenuFlyoutPresenter, but actually no, which leads to the failure of adding them to radio groups.
Avalonia/src/Avalonia.Controls/Platform/DefaultMenuInteractionHandler.cs
Lines 628 to 640 in ed0cc75
The text was updated successfully, but these errors were encountered: