Esempio n. 1
0
        public void BuildWindow()
        {
            //Create new instances of the window, helix viewer, and model view
            window    = new MainWindow();
            helixView = new HelixToolkit.Wpf.HelixViewport3D();
            visual    = new ModelVisual3D();

            //Set the Helix Viewer Properties
            helixView.Width  = 300;
            helixView.Height = 300;
            //Add Lights to the Viewer
            helixView.Children.Add(new HelixToolkit.Wpf.DefaultLights());
            //Add the Model Visualization to the viewer (Note: The geometry will be added to the viewer at a later point)
            helixView.Children.Add(visual);

            //Set the Window Properties
            window.Width   = 320;
            window.Height  = 320;
            window.Topmost = true;
            //Add the Viewer to the Window
            window.Content = helixView;
        }
Esempio n. 2
0
 private static void CurrentViewportChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
 {
     CurrentViewport = e.NewValue as HelixToolkit.Wpf.HelixViewport3D;
 }
Esempio n. 3
0
 public static void SetCurrentViewport(DependencyObject obj, HelixToolkit.Wpf.HelixViewport3D value)
 {
     obj.SetValue(CurrentViewportProperty, value);
 }