static void OnCameraChanged(DependencyObject depObj, DependencyPropertyChangedEventArgs e) { Panel3D panel3D = depObj as Panel3D; Camera camera = e.NewValue as Camera; if (panel3D._viewport.Camera != camera) { panel3D._viewport.Camera = camera; } }
static void OnAllowTransparencyChanged(DependencyObject depObj, DependencyPropertyChangedEventArgs e) { Panel3D panel3D = depObj as Panel3D; if (panel3D != null) { var frontModel = panel3D._viewport.FrontModel; panel3D._viewport.AllowTransparency = (bool)e.NewValue; if (frontModel != null) { panel3D.BuildScene(frontModel); } } }