File -> New -> project
select WPF application and press OK
3) After that you have to do few changes to the XAML coding
Your coding appear like the following
<Window x:Class="MyApp.Window1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="Window1" Height="300" Width="300">
<Grid>
<Ellipse Margin="-1,-1,-1,1" Name="ellipse1" Stroke="Black"/>
</Grid>
</Window>
That must change like following
<Window x:Class="MyApp.Window1" MouseLeftButtonDown="Window_MouseLeftButtonDown" WindowStyle="None" AllowsTransparency="True" Background="Transparent"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="Window1" Height="300" Width="300">
<Grid>
<Ellipse Margin="-1,-1,-1,1" Name="ellipse1" Stroke="Black" Fill="Gray" Opacity="0.5"/>
<Button Height="23" Margin="99,28,104,0" Name="button1" VerticalAlignment="Top">Close</Button>
</Grid>
</Window>
following picture show you the changes by underlining newly added parts
4) Then double click on the button and write the following coding part
Close();
5) Then write the following code inside the "Window_MouseLeftButtonDown" method
DragMove();
You can see the above 2 steps from the picture
6) Finally build the solution and see the result. you can drag the form by draging the content of the form