MainWindow.xaml 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. <Window
  2. x:Class="FlowWorkEditDemo.MainWindow"
  3. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  4. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  5. xmlns:d="clr-namespace:WorkFlowEdit.Diagrams"
  6. Title="MainWindow"
  7. Width="800"
  8. Height="450">
  9. <DockPanel>
  10. <StackPanel
  11. Width="200"
  12. Margin="0,0,10,0"
  13. DockPanel.Dock="Left">
  14. <StackPanel Margin="0,10,0,10">
  15. <TextBlock Margin="0,0,0,10" Text="Zoom:" />
  16. <Slider
  17. x:Name="_zoom"
  18. Maximum="10"
  19. Minimum="0.1"
  20. Value="1" />
  21. <StackPanel Margin="0,10,0,10">
  22. <TextBlock Margin="0,0,0,10" Text="Toolbox:" />
  23. <Border BorderBrush="Black" BorderThickness="1">
  24. <ItemsControl x:Name="_toolbox">
  25. <ItemsControl.ItemsPanel>
  26. <ItemsPanelTemplate>
  27. <WrapPanel />
  28. </ItemsPanelTemplate>
  29. </ItemsControl.ItemsPanel>
  30. </ItemsControl>
  31. </Border>
  32. </StackPanel>
  33. </StackPanel>
  34. </StackPanel>
  35. <Border BorderBrush="Black" BorderThickness="1">
  36. <d:DiagramScrollView>
  37. <d:DiagramView
  38. x:Name="_editor"
  39. AllowDrop="True"
  40. DocumentSize="2000,2000"
  41. GridCellSize="20,20"
  42. Zoom="{Binding ElementName=_zoom, Path=Value}" />
  43. </d:DiagramScrollView>
  44. </Border>
  45. </DockPanel>
  46. </Window>