Here I am going to take you through a beautiful example to understand this:
Step 1: Create a new Silverlight project.
Add the following code to the XAML page:
<UserControl x:Class="SilverlightApp_webcamMicrophone.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
d:DesignHeight="300" d:DesignWidth="400">
<Grid x:Name="LayoutRoot" Background="#333333">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="240*"/>
<RowDefinition Height="60*"/>
</Grid.RowDefinitions>
<Rectangle x:Name="CaptureDisplay"
Fill="White"
Grid.ColumnSpan="2"
Margin="5"/>
<Button x:Name="StartCapture"
Click="StartCapture_Click"
Content="Start Capture"
Grid.Row="1" Grid.Column="0"
Margin="5"/>
<Button x:Name="StopCapture"
Click="StopCapture_Click"
Content="Stop Capture"

Dinesh BeniwalPosted Apr 14, 2012, 5:01 AM
Good Start Smruti, Welcome to the C# Corner.