ToolPinnedControl.axaml 1.3 KB

12345678910111213141516171819202122232425262728293031323334
  1. <ResourceDictionary xmlns="https://github.com/avaloniaui"
  2. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  3. xmlns:dmc="using:Dock.Model.Controls"
  4. xmlns:core="using:Dock.Model.Core">
  5. <Design.PreviewWith>
  6. <ToolPinnedControl Width="30" Height="400" />
  7. </Design.PreviewWith>
  8. <ControlTheme x:Key="{x:Type ToolPinnedControl}" TargetType="ToolPinnedControl">
  9. <Setter Property="Orientation" Value="Vertical" />
  10. <Setter Property="Template">
  11. <ControlTemplate>
  12. <ItemsControl ItemsSource="{TemplateBinding Items}"
  13. x:DataType="dmc:IRootDock"
  14. x:CompileBindings="True">
  15. <ItemsControl.ItemsPanel>
  16. <ItemsPanelTemplate>
  17. <StackPanel Orientation="{Binding $parent[ToolPinnedControl].Orientation}"
  18. DockProperties.IsDropArea="True" />
  19. </ItemsPanelTemplate>
  20. </ItemsControl.ItemsPanel>
  21. <ItemsControl.DataTemplates>
  22. <DataTemplate DataType="core:IDockable">
  23. <ToolPinItemControl Orientation="{Binding $parent[ToolPinnedControl].Orientation}" />
  24. </DataTemplate>
  25. </ItemsControl.DataTemplates>
  26. </ItemsControl>
  27. </ControlTemplate>
  28. </Setter>
  29. </ControlTheme>
  30. </ResourceDictionary>