public void Change3D2D(object sender, RoutedEventArgs e) { IDView view = (this.DataContext as ViewModel).MyIDView; if (buttonText.Text == "2D") { view.Dimension = IDDimension.dim2D; buttonText.Text = "3D"; } else if (buttonText.Text == "3D") { view.Dimension = IDDimension.dim3D; buttonText.Text = "2D"; } }
public void Go3D(object sender, RoutedEventArgs e) { IDView view = (this.DataContext as ViewModel).MyIDView; view.Dimension = IDDimension.dim3D; }