internal void VerifyCorrectSideIsInView(bool showDetailedView) { if (this.CommandTarget == null) { return; } RotationDestination destination = showDetailedView ? RotationDestination.BackSide : RotationDestination.FrontSide; if (ContentControl3D.RotateCommand.CanExecute(destination, this.CommandTarget)) { ContentControl3D.RotateCommand.Execute(destination, this.CommandTarget); } }
void OnRotateCommandExecuted(object sender, ExecutedRoutedEventArgs e) { if (!this.CanRotate) { return; } if (e.Parameter is RotationDestination) { RotationDestination destination = (RotationDestination)e.Parameter; if (destination == RotationDestination.FrontSide) { this.BringFrontSideIntoView(); } else { this.BringBackSideIntoView(); } } else { this.Rotate(); } }