/// <summary> /// Call this method in Loaded event as the event will be automatically deregistred when the FrameworkElement has been unloaded /// </summary> public static void RegisterSearchPressed(FrameworkElement page, Action searchKeyPressed) { var c = new SearchKeyContainer(searchKeyPressed); RegisterAcceleratorKeyActivated(page, c.AcceleratorKeyActivated); }
/// <summary>Call this method in Loaded event as the event will be automatically /// deregistered when the FrameworkElement has been unloaded. </summary> public static void RegisterSearchPressed(FrameworkElement page, Action searchKeyPressed) { var c = new SearchKeyContainer(searchKeyPressed); RegisterAcceleratorKeyActivated(page, c.AcceleratorKeyActivated); }