Advertisement
programusy

Untitled

Sep 15th, 2023
21
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.17 KB | None | 0 0
  1. <Window x:Class="WpfWinFormsIntegration.MainWindow"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. Title="WinForms Integration" Height="400" Width="600">
  5. <Grid>
  6. <WindowsFormsHost Name="windowsFormsHost" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
  7. <wf:Form x:Name="winFormsContainer" AutoScaleMode="Font">
  8. <wf:Panel Name="drawingPanel" Dock="Fill" MouseDown="drawingPanel_MouseDown" MouseUp="drawingPanel_MouseUp"></wf:Panel>
  9. <wf:Button x:Name="btnDrawShape" Text="Draw Shape" Location="10, 10" Click="btnDrawShape_Click"/>
  10. <wf:RadioButton x:Name="radioEllipse" Text="Ellipse" Location="10, 40" Checked="radioEllipse_CheckedChanged"/>
  11. <wf:RadioButton x:Name="radioRoundedRectangle" Text="Rounded Rectangle" Location="10, 60" Checked="radioRoundedRectangle_CheckedChanged"/>
  12. <wf:RadioButton x:Name="radioRectangle" Text="Rectangle" Location="10, 80" Checked="radioRectangle_CheckedChanged"/>
  13. </wf:Form>
  14. </WindowsFormsHost>
  15. </Grid>
  16. </Window>
  17.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement