コード例 #1
0
        private void OnToolbarClick(object sender, ToolbarButtonClickEventArgs e)
        {
            switch (e.ClickedButton)
            {
            case ToolbarButton.New:
                NewCommand?.TryExecute();
                break;

            case ToolbarButton.Delete:
                DeleteCommand?.TryExecute();
                break;

            case ToolbarButton.Select:
                StartSelectionCommand?.TryExecute();
                break;

            case ToolbarButton.Refresh:
                RefreshCommand?.TryExecute();
                break;

            case ToolbarButton.Cancel:
                CancelSelectionCommand?.TryExecute();
                break;
            }
        }
コード例 #2
0
        private void OnToolbarClick(object sender, ToolbarButtonClickEventArgs e)
        {
            switch (e.ClickedButton)
            {
            case ToolbarButton.Back:
                BackCommand?.TryExecute();
                break;

            case ToolbarButton.Edit:
                EditCommand?.TryExecute();
                break;

            case ToolbarButton.Delete:
                DeleteCommand?.TryExecute();
                break;

            case ToolbarButton.Save:
                SaveCommand?.TryExecute();
                break;

            case ToolbarButton.Cancel:
                CancelCommand?.TryExecute();
                break;
            }
        }