public void setViewType(ObjectViewType type) { if (type == ObjectViewType.ChartView) { chartViewGrid.Visibility = System.Windows.Visibility.Visible; tableViewGrid.Visibility = System.Windows.Visibility.Collapsed; textViewGrid.Visibility = System.Windows.Visibility.Collapsed; } else if (type == ObjectViewType.TableView) { chartViewGrid.Visibility = System.Windows.Visibility.Collapsed; tableViewGrid.Visibility = System.Windows.Visibility.Visible; textViewGrid.Visibility = System.Windows.Visibility.Collapsed; } else if (type == ObjectViewType.TextView) { chartViewGrid.Visibility = System.Windows.Visibility.Collapsed; tableViewGrid.Visibility = System.Windows.Visibility.Collapsed; textViewGrid.Visibility = System.Windows.Visibility.Visible; } }