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; } }
private void OnInputGotFocus(object sender, RoutedEventArgs e) { if (!IsEditMode) { EditCommand?.TryExecute(); } }
private void OnVisualStateChanged(object sender, FormVisualState e) { if (e == FormVisualState.Focused) { if (!IsEditMode) { EditCommand?.TryExecute(); } } }