private static void On_Sheet_Changed(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            DrawingSheet oldSheet = e.OldValue as DrawingSheet;

            if (oldSheet != null)
            {
                oldSheet.PropertyChanged -= SheetPropertyChanged;
            }

            DrawingSheet newSheet = e.NewValue as DrawingSheet;

            if (newSheet != null)
            {
                newSheet.PropertyChanged += SheetPropertyChanged;
            }

            RackAppViewport3D rackViewport = d as RackAppViewport3D;

            if (rackViewport != null)
            {
                // Zoom to fit all content when user changes sheet.
                rackViewport.m_bZoomExtents = true;
                rackViewport.UpdateGeometry();
            }
        }
        private static void On_ShowRoof_Changed(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            RackAppViewport3D rackViewport = d as RackAppViewport3D;

            if (rackViewport != null)
            {
                rackViewport.UpdateGeometry();
            }
        }
        private static void On_ViewportContent_Changed(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            RackAppViewport3D rackViewport = d as RackAppViewport3D;

            if (rackViewport != null)
            {
                // Zoom to fit all content when user changes viewport content type.
                rackViewport.m_bZoomExtents = true;
                rackViewport.UpdateGeometry();
            }
        }