timheuer / callisto

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.
http://timheuer.com/blog/archive/2012/05/31/introducing-callisto-a-xaml-toolkit-for-metro-apps.aspx
Other
338 stars 108 forks source link

When a Menu is wrapped in a UserControl which is added to a Flyout, the app crashes when hitting Escape #166

Closed areijngoudt closed 11 years ago

areijngoudt commented 11 years ago

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

stefanolson commented 11 years ago

Duplicate of: https://github.com/timheuer/callisto/issues/140