Binding command in UWP
I have a MenuFlyout in my App.xaml: <Application.Resources> <MenuFlyout x:Key="LessonFlyout"> <MenuFlyoutItem Text="Edit"/> <MenuFlyoutItem Text="Delete"/> </MenuFlyout> </Application.Resources> And I wanted to give MenuFlyoutItem click event but the compiler says I can't do this. But I need a click event so I searched and found out that I can bind command to MenuFlyoutItem. My MenuFlyout will be attached to a different objects in different pages. For example: StackPanel thisSender = sender as StackPanel; FlyoutBase.SetAttachedFlyout(thisSender, Application.Current.Resources["LessonFlyout"] as