public UiDxTextureViewer() { HorizontalAlignment = HorizontalAlignment.Left; VerticalAlignment = VerticalAlignment.Top; _viewport = new UiDxViewport(); _viewport.DrawSprites += DrawSprites; HorizontalAlignment = HorizontalAlignment.Stretch; VerticalAlignment = VerticalAlignment.Stretch; Content = _viewport; }