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; }
private void WindowLoaded(object sender, EventArgs e) { MyVisualHost visualHost = new MyVisualHost(); MyCanvas.Children.Add(visualHost); }
private void WindowLoaded(object sender, EventArgs e) { _visualHost = new MyVisualHost(CreateDrawingVisualRectangle(Brushes.LightBlue)); MyCanvas.Children.Add(_visualHost); }