Follow these steps to create various shapes in your application:
- Open your MainWindow.xaml file, and replace the existing Grid panel with UniformGrid. Set its maximum columns count to 3, by setting its Column property.
- Let's add our first shape, a Rectangle. Add the following XAML code inside the UniformGrid:
<Rectangle Width="200" Height="100" Stroke="DarkBlue" StrokeThickness="5" Fill="SkyBlue" Margin="10 5" />
- Now let's add an Ellipse, which you can change to a circle by setting the same value to its Height and Width properties. Add the following code to create the ellipse:
<Ellipse Width="200" Height="100" Stroke="DarkBlue" StrokeThickness="5" Fill="SkyBlue" Margin="10 5" />
- To add a Line in the panel, add the following XAML:
<Line X1="10" Y1="80" X2=...