public Direct3DRenderProvider() { RunOnUIThread(() => { DrawingSurface = new System.Windows.Controls.DrawingSurface(); DrawingSurface.HorizontalAlignment = HorizontalAlignment.Stretch; DrawingSurface.VerticalAlignment = VerticalAlignment.Stretch; SharpDXRenderProvider = new SharpDXRenderProvider(); SharpDXRenderProvider.Run(DrawingSurface); }); }