Create menu flyout using c#
windows-8.1, winrt-xaml, xaml
Solution
This code works:
MenuFlyout m = new MenuFlyout();
MenuFlyoutItem mn = new MenuFlyoutItem();
mn.Text = "Item 1";
m.Items.Add(mn);
m.ShowAt((FrameworkElement)sender);
Problem
I want to create menu flyout using C#. I tried this ``` List<string> l = new List<string>(); l.Add("Rotate"); l.Add("Scale"); l.Add("Bring to Front"); l.Add("Send to Back"); MenuFlyout m = new MenuFlyout(); MenuFlyoutItem mn = l; m.Items.Add(mn); ``` It gives error,how to do that?