private void AddObservers(IList <IEventObserver <IPopupEvent, ICancellablePopupEvent, CompletionPopupView> > observers) { observers.Add(new CustomKeyAction { Action = x => { x.InvalidatePosition(); x.IsOpen = true; }, Key = Key.Space, Modifiers = new[] { Key.LeftCtrl }, ShouldSwallowKeyPress = true }); observers.Add(new SelectionChangedHideAction()); observers.Add(new InsertionAction(Key.Enter) { ShouldSwallow = true }); observers.Add(new InsertionAction(Key.OemPeriod)); observers.Add(new InsertOnItemClicked()); observers.Add(new PositionAction()); observers.Add(new CustomKeyAction(x => PopupActions.Hide(this), Enumerable.Empty <Key>(), Key.Escape)); observers.Add(new ElementChangedKeyAction { Key = Key.Up, IsTargetSource = IsEditor }); observers.Add(new ElementChangedKeyAction { Key = Key.Down, IsTargetSource = IsEditor }); }
public override void EndUpdate() { SAC.EndUpdate(); OC.EndUpdate(); PopupActions.EndUpdate(); base.EndUpdate(); }
public override void BeginUpdate() { base.BeginUpdate(); SAC.BeginUpdate(); OC.BeginUpdate(); PopupActions.BeginUpdate(); }
private void RefreshMenuButtons() { if (m_PopUpMenu == null || PopupActions.ItemLinks.Count > 0) { return; } foreach (MenuItem mi in m_PopUpMenu.MenuItems) { var button = new BarButtonItem(PopupActions.Manager, mi.Text) { Tag = mi }; button.ItemClick += ButtonOnItemClick; PopupActions.AddItem(button); } }
private void ActionsMenuButton_Tapped(object sender, EventArgs e) { var popupActions = new PopupActions(ShowEditor, OnDeleteSwiped); popupActions.Show(sender as View); }