Example #1
0
        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;
            }
        }
Example #2
0
        static void OnAllowTransparencyChanged(DependencyObject depObj, DependencyPropertyChangedEventArgs e)
        {
            Panel3D panel3D    = depObj as Panel3D;
            var     frontModel = panel3D._viewport.FrontModel;

            panel3D._viewport.AllowTransparency = (bool)e.NewValue;

            if (frontModel != null)
            {
                panel3D.BuildScene(frontModel);
            }
        }
Example #3
0
        void OnPanel3DLoaded(object sender, RoutedEventArgs e)
        {
            if (e.OriginalSource is Panel3D)
            {
                // Grab a reference to the Panel3D when it loads.
                _panel3D = e.OriginalSource as Panel3D;
                _panel3D.AllowTransparency = this.chkAllowTransparency.IsChecked ?? false;
                _panel3D.AutoAdjustOpacity = this.chkAutoAdjustOpacity.IsChecked ?? false;

                this.itemLayoutDirectionEditor.DataContext = _panel3D.ItemLayoutDirection;
            }
        }
Example #4
0
 void OnPanel3DLoaded(object sender, RoutedEventArgs e)
 {
     // Grab a reference to the Panel3D when it loads.
     _panel3D = sender as Panel3D;
 }