CatenaLogic.Windows.Presentation.WebcamPlayer.CapPlayer.device_OnNewBitmapReady C# (CSharp) Method

device_OnNewBitmapReady() private method

Invoked when a new bitmap is ready
private device_OnNewBitmapReady ( object sender, EventArgs e ) : void
sender object Sender
e System.EventArgs EventArgs
return void
        private void device_OnNewBitmapReady(object sender, EventArgs e)
        {
            // Create new binding for the framerate
            Binding b = new Binding();
            b.Source = Device;
            b.Path = new PropertyPath(CapDevice.FramerateProperty);
            SetBinding(FramerateProperty, b);

            // Get the sender
            CapDevice typedSender = sender as CapDevice;
            if (typedSender != null)
            {
                // Set the source of the image
                Source = typedSender.BitmapSource;
            }
        }