예제 #1
0
 public MainWindow()
 {
     InitializeComponent();
     engine      = new EditorInterop.Engine();
     render_view = new RenderView(this, engine);
     render_view.HorizontalAlignment = HorizontalAlignment.Stretch;
     render_view.VerticalAlignment   = VerticalAlignment.Stretch;
     Grid.SetColumn(render_view, 2);
     content_grid.Children.Add(render_view);
     engine.init(render_view.get_HWND(), render_view.get_resoulution());
 }
예제 #2
0
        public RenderView(Window parent, EditorInterop.Engine engine)
        {
            InitializeComponent();
            this.parent   = parent;
            this.engine   = engine;
            render_window = new RenderWindow();


            parent.LocationChanged += Window_LocationChanged;
            parent.ContentRendered += Window_ContentRendered;

            WindowInteropHelper Helper = new WindowInteropHelper(render_window);
            IntPtr hWnd = Helper.EnsureHandle();

            Helper.Owner = hWnd;
        }