You can use one of the following to capture the image from web cam:
http://www.jpreece.com/wpf/webcam-image-capture/
or
http://easywebcam.codeplex.com/
originally posted by
Abhinav S
Then use the following to change the image control from the stored image.
private void ShowPhoto()
{
mainImage.Source = new BitmapImage(new Uri(@"pack://siteoforigin:,,,/images/userPhotoImage.jpg"));
}
This will load an image called userPhotoImage from the relative path (to the executable) "/images".