示例#1
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;
            }
        }