void XnaTimer_Tick(object sender, EventArgs e)
        {
            if (Capture != null && FrameAvailable)
            {
                var width     = (int)Capture.PreviewResolution.Width;
                var height    = (int)Capture.PreviewResolution.Height;
                var byteCount = (int)(width * height * 1.5);
                if (PreviewYuv == null || PreviewYuv.Length != byteCount)
                {
                    PreviewYuv = new byte[byteCount];
                }
                Capture.GetPreviewBufferYCbCr(PreviewYuv);

                RaiseFrame(new VideoBuffer(width, height, new VideoPlane(PreviewYuv))
                {
                    Rotate = BufferRotate
                });
                FrameAvailable = false;

                //if (Preview != null)
                //{
                //    Rectangle control = (Rectangle)Preview.GetControl();
                //    FM.Log.Info("Preview W: " + control.Width + " H: " + control.Height + " Visible: " + control.Visibility + " Top: " + Canvas.GetTop(control) + " Left: " + Canvas.GetLeft(control));
                //}
            }
        }