Advertisement
programusy

Untitled

Sep 15th, 2023
36
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.16 KB | None | 0 0
  1. <Window x:Class="ShapeDrawingApp.MainWindow"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. Title="Shape Drawing App" Width="800" Height="600">
  5. <Grid>
  6. <Grid.RowDefinitions>
  7. <RowDefinition Height="Auto"/>
  8. <RowDefinition Height="*"/>
  9. </Grid.RowDefinitions>
  10.  
  11. <!-- Buttons for selecting shapes -->
  12. <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Grid.Row="0">
  13. <Button Name="btnEllipse" Content="Ellipse" Click="btnEllipse_Click"/>
  14. <Button Name="btnRectangle" Content="Rectangle" Click="btnRectangle_Click"/>
  15. <Button Name="btnCircle" Content="Circle" Click="btnCircle_Click"/>
  16. <Button Name="btnLine" Content="Line" Click="btnLine_Click"/>
  17. </StackPanel>
  18.  
  19. <!-- Drawing Canvas -->
  20. <Canvas Name="drawingCanvas" Grid.Row="1" Background="White"
  21. MouseDown="drawingCanvas_MouseDown"
  22. MouseUp="drawingCanvas_MouseUp"
  23. MouseMove="drawingCanvas_MouseMove"/>
  24. </Grid>
  25. </Window>
  26.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement