Perform the following steps to create a simple Canvas panel with a few label controls in it and position them to specific coordinate positions:
- Open Solution Explorer and navigate to the project.
- Open the MainWindow.xaml file and replace the default Grid with the following lines:
<Canvas> <Label Width="100" Height="60" Background="GreenYellow" Canvas.Left="70" Canvas.Top="40" Content="(70, 40)" FontSize="20" FontWeight="Bold"/> <Label Width="100" Height="60" Background="YellowGreen" Canvas.Left="220" Canvas.Top="90" Content="(220, 90)" FontSize="20" FontWeight="Bold"/> </Canvas>
- Build and run the application. It will show the following screen:
- Now resize the window and observe...