/// <summary> /// Callback called when the DefaultLighting property's value has changed. /// </summary> /// <param name="d">Sender object</param> /// <param name="e">Callback arguments</param> private static void DefaultLightingPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { bool b = (bool)e.NewValue; Workshop3D w = (Workshop3D)d; if (b) { w._viewport.Children.Add(w._defaultLightingModel); } else { w._viewport.Children.Remove(w._defaultLightingModel); } }
/// <summary> /// Callback called when the ShowCommandPanel property's value has changed. /// </summary> /// <param name="d">Sender object</param> /// <param name="e">Callback arguments</param> private static void ShowCommandPanelPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { bool b = (bool)e.NewValue; Workshop3D w = (Workshop3D)d; if (b) { w._commandPanel.Visibility = Visibility.Visible; } else { // w._commandPanel.Visibility = Visibility.Collapsed; w._commandPanel.Visibility = Visibility.Hidden; //2.2.0.1 } }