예제 #1
0
        public Viewport3dVisualExample()
        {
            // Instantiate the host visual that hosts the 3D object.
            MyVisualHost vh        = new MyVisualHost();
            StackPanel   mainPanel = new StackPanel();

            // Add the drawing (3D object) to the page.
            mainPanel.Children.Add(vh);
            this.Content = mainPanel;
        }
예제 #2
0
        private void WindowLoaded(object sender, EventArgs e)
        {
            MyVisualHost visualHost = new MyVisualHost();

            MyCanvas.Children.Add(visualHost);
        }
예제 #3
0
 private void WindowLoaded(object sender, EventArgs e)
 {
     _visualHost = new MyVisualHost(CreateDrawingVisualRectangle(Brushes.LightBlue));
     MyCanvas.Children.Add(_visualHost);
 }