public void AddShowingHandler(UIElement element, InputPaneShowingHandler handler) { if (handlerMap.ContainsKey(element)) { throw new System.Exception("A handler is already registered!"); } else { handlerMap.Add(element, handler); element.GotFocus += GotFocusHandler; element.LostFocus += LostFocusHandler; } }
public void AddShowingHandler(UIElement element, InputPaneShowingHandler handler) { if (handlerMap.ContainsKey(element)) { throw new System.Exception(T360ErrorCodes.HandlerErrorMsg); } else { handlerMap.Add(element, handler); element.GotFocus += GotFocusHandler; element.LostFocus += LostFocusHandler; } }
public AdjustmentView() { this.InitializeComponent(); inputPaneHelper = new InputPaneHelper(); InputPaneShowingHandler amountInputPaneShowingHandler = new InputPaneShowingHandler(CustomKeyboardHandler); InputPaneShowingHandler narrativeInputPaneShowingHandler = new InputPaneShowingHandler(CustomKeyboardHandler); inputPaneHelper.SubscribeToKeyboard(true); inputPaneHelper.AddShowingHandler(narrativeText, narrativeInputPaneShowingHandler); inputPaneHelper.AddShowingHandler(amountText, amountInputPaneShowingHandler); inputPaneHelper.AddShowingHandler(amountTextFilled, amountInputPaneShowingHandler); inputPaneHelper.SetHidingHandler(new InputPaneHidingHandler(InputPaneHiding)); SetAmountPercentage(true); SetPositiveNegativeButtons(false); Messenger.Default.Register <string>(this, Constants.AdjustDefaultSettings, SetDefaults); }