Inheritance: UIView, IVideoSurface
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();
			_videoSurface = new VideoSurface();
			VideoView.Add(_videoSurface);
			CrossMediaManager.Current.VideoPlayer.RenderSurface = _videoSurface;
			CrossMediaManager.Current.PlayingChanged += (sender, e) => ProgressView.Progress = (float)e.Progress;

            // Perform any additional setup after loading the view, typically from a nib.
        }
        private void SetVideoSurface(VideoSurface canvas)
        {
            var size = new Size(canvas.ActualWidth, canvas.ActualHeight);

            _player.SetSurfaceSize(size);

            var compositor = ElementCompositionPreview.GetElementVisual(canvas).Compositor;
            var surface    = _player.GetSurface(compositor);

            _spriteVisual      = compositor.CreateSpriteVisual();
            _spriteVisual.Size =
                new Vector2((float)canvas.ActualWidth, (float)canvas.ActualHeight);

            CompositionBrush brush = compositor.CreateSurfaceBrush(surface.CompositionSurface);

            _spriteVisual.Brush = brush;

            var container = compositor.CreateContainerVisual();

            container.Children.InsertAtTop(_spriteVisual);

            ElementCompositionPreview.SetElementChildVisual(canvas, container);
        }
        private void SetVideoSurface(VideoSurface canvas)
        {
            var size = new Size(canvas.ActualWidth, canvas.ActualHeight);
            _player.SetSurfaceSize(size);

            var compositor = ElementCompositionPreview.GetElementVisual(canvas).Compositor;
            var surface = _player.GetSurface(compositor);

            _spriteVisual = compositor.CreateSpriteVisual();
            _spriteVisual.Size =
                new Vector2((float) canvas.ActualWidth, (float) canvas.ActualHeight);

            CompositionBrush brush = compositor.CreateSurfaceBrush(surface.CompositionSurface);
            _spriteVisual.Brush = brush;

            var container = compositor.CreateContainerVisual();
            container.Children.InsertAtTop(_spriteVisual);

            ElementCompositionPreview.SetElementChildVisual(canvas, container);
        }