I want to restrict a flyout and its submbmenu flyouts to the window of the app. This is what it looks like right now:
But when I try to set
ShouldConstrainToRootBounds
to true
the submenuflyout displays really small number of items:
How do I make my submenuflyouts display maximum number of contents while still restricting it to app's window.
This is a new feature in 1903 and above systems, that is, controls inherited from FlyoutBase
are not constrained by app window.
I reproduced your problem, which only appears if the currently displayed sub-item is greater than the height of the current window. The specific display position is calculated internally by MenuFlyout
, and because Flyout and Window are not at the same level, the current solution is to set ShouldConstrainToRootBounds
to False
, so that MenuFlyout can be completely displayed.