void _Selected(TreeNodeAdv node, bool isKey) { ResultItem = node.Tag; ResultWasKey = isKey; _Close(); SelectedAction?.Invoke(this); }
protected virtual void OnActionSelected() { if (SelectedAction != null) { SelectedAction.Invoke(); } }
private void TreeElement_Selected(object sender, RoutedEventArgs e) { var node = e.OriginalSource as TreeViewItem ?? throw new NullReferenceException("Bad tree node"); var trueNode = node.Header as ITreeNodeViewModel ?? throw new NullReferenceException("Bad tree node"); SelectedAction?.Invoke(trueNode); }
private void NativeControl_SelectionChanged(object sender, SelectionChangedEventArgs e) { if (SelectedAction != null || SelectionChangedAction != null) { SelectedAction?.Invoke(e.CurrentSelection.Count > 0 ? (VisualNode)e.CurrentSelection[0] : null); SelectionChangedAction?.Invoke(e.CurrentSelection.Cast <VisualNode>().ToList(), e.PreviousSelection.Cast <VisualNode>().ToList()); Invalidate(); } }
public UIActionSheet ShowActionSheetForBelowiOS8(string[] menuItems) { UIActionSheet actionSheet = new UIActionSheet(null, null, "Cancel", null, menuItems); actionSheet.Clicked += (sender, e) => { SelectedAction?.Invoke(sender, e); }; return(actionSheet); }
public void ActionSheetDelegateMethod(string selectedMenu) { SelectedAction?.Invoke(selectedMenu, new EventArgs()); }