A control toolkit for Windows 8 XAML applications. Contains some UI controls to make it easier to create Windows UI style apps for the Windows Store in accordance with Windows UI guidelines.
The Menu.OnKeyDown expects the parent to be a Flyout:
private void OnKeyDown(object sender, KeyRoutedEventArgs args)
{
switch (args.Key)
{
case Windows.System.VirtualKey.Escape:
((Flyout)this.Parent).IsOpen = false;
break;
When the Menu is wrapped in a UserControl, the Cast fails when [Escape] is pressed, and the app is terminated
The Menu.OnKeyDown expects the parent to be a Flyout: private void OnKeyDown(object sender, KeyRoutedEventArgs args) { switch (args.Key) { case Windows.System.VirtualKey.Escape: ((Flyout)this.Parent).IsOpen = false; break; When the Menu is wrapped in a UserControl, the Cast fails when [Escape] is pressed, and the app is terminated