Introduction
Here, in this article, we will be working on creating a drawing pad in Windows Presentation Foundation.
Development Requirements
Follow the following steps to create a drawing pad in WPF,
Step 1: Run Visual Studio 2015 -> Visual C# -> Windows -> WPF Application.

Step 2: Go to MainWindow.xaml and paste the following code inside the Grid:
- <InkCanvas HorizontalAlignment="Stretch" Margin="9,9,9,68" Name="inkCanvas1" VerticalAlignment="Stretch" Width="Auto" Grid.RowSpan="2" Gesture="inkCanvas1_Gesture" />
- <Button Content="Clear" Height="23" HorizontalAlignment="Left" Margin="150,63,0,0" Name="button1" VerticalAlignment="Top" Width="75" Click="button1_Click" Grid.Row="1" />
- <Button Content="Close" Height="23" HorizontalAlignment="Left" Margin="231,63,0,0" Name="button2" VerticalAlignment="Top" Width="75" Click="button2_Click" Grid.Row="1" />
- <Label Content="You can draw any image by rotating the mouse" Height="34" HorizontalAlignment="Left" Margin="27,12,0,0" Name="label1" VerticalAlignment="Top" ContentStringFormat="Draw any image by rotating the mouse." Background="#FF9ED1B3" FontSize="20" FontFamily="Comic Sans MS" />







Shobana JPosted Jul 12, 2016, 4:05 AM
Good share
Joe WilsonPosted Jul 12, 2016, 3:17 AM
Thank you.
kalu singh raoPosted Jul 12, 2016, 1:28 AM
Nice...
Raja TPosted Jul 12, 2016, 12:31 AM
Nice , Thanks for sharing
Akshay PhadkePosted Jul 11, 2016, 11:56 PM
Nice