/// <summary> /// Starts listening for the Enter key when the button <see cref="IsDefault"/>. /// </summary> /// <param name="root">The input root.</param> private void ListenForDefault(IInputElement root) { root.AddHandler(InputElement.KeyDownEvent, this.RootKeyDown); }
/// <summary> /// Starts listening for the Enter key when the button <see cref="IsDefault"/>. /// </summary> /// <param name="root">The input root.</param> private void ListenForDefault(IInputElement root) { root.AddHandler(KeyDownEvent, RootKeyDown); }
/// <summary> /// Starts listening for the Escape key when the button <see cref="IsCancel"/>. /// </summary> /// <param name="root">The input root.</param> private void ListenForCancel(IInputElement root) { root.AddHandler(KeyDownEvent, RootCancelKeyDown); }
// Token: 0x0600304E RID: 12366 RVA: 0x000D90A4 File Offset: 0x000D72A4 private static void SetUpEventHandler(IInputElement element, RoutedEvent routedEvent, Delegate handler) { element.RemoveHandler(routedEvent, handler); element.AddHandler(routedEvent, handler); }
private static void SetUpEventHandler(IInputElement element, RoutedEvent routedEvent, Delegate handler) { // // Setting NavigateUri causes navigation event handlers to be set up. // Doing this repeatedly would keep adding handlers; therefore remove any handler first. // element.RemoveHandler(routedEvent, handler); element.AddHandler(routedEvent, handler); }
public static Action Enhance(this IInputElement element, DispatchEventHandler handler) { element.AddHandler(FluxAction.DispatchEvent, handler); return(() => element.RemoveHandler(FluxAction.DispatchEvent, handler)); }