Repository navigation
Description
Current behavior
Using a TemplateBinding in the Command parameter of a MenuFlyoutItem, in the Style of a custom Control, doesnt work.

TemplateBinding is used here so we can reuse this Style at multiple places in the code by giving a different command everytime.

We use it here and give it the CustomCommand command we made in the logic Class.

We see what our CustomCommand does, it modifies the page's TextBlock when the MenuFlyoutItem is clicked.


Expected behavior
Should do the same thing UWP currently does:

How to reproduce it (as minimally and precisely as possible)
Open the sample app.
Click the button.
Click the first MenuFlyoutItem (choice 1).
Notice there is text appearing above the button on UWP, but not iOS/Android.
Workaround
Placing the MenuFlyout style (and its MenuFlyoutItems) directly in the Xaml page where it is used.
In this case, moving everything that is inside the ControlTemplate (Button -> Button.Flyout -> his 2 MenuFlyoutItem) directly inside the main grid of the app, so not using the custom control.
Works on UWP/WinUI
Yes
Environment
Uno.UI / Uno.UI.WebAssembly / Uno.UI.Skia, Uno.UI.RemoteControl / Uno.WinUI.RemoteControl
NuGet package version(s)
4.3.8
Affected platforms
iOS, Android
IDE
Visual Studio 2022
IDE version
17.1.6
Relevant plugins
No response
Anything else we need to know?
No response
Activity
[-][Uno] [Android/iOS] [MenuFlyoutItem] Using TemplateBinding in the Command parameter of a MenuFlyoutItem doesnt work #406[/-][+][Android/iOS] Using TemplateBinding in the Command parameter of a MenuFlyoutItem doesnt work[/+]jeromelaban commentedon Jun 15, 2022
Likely related to #1621
Xiaoy312 commentedon Jul 16, 2024
fixed by #9452