PinnedDockControl.axaml 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <ResourceDictionary xmlns="https://github.com/avaloniaui"
  2. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  3. xmlns:dmc="clr-namespace:Dock.Model.Controls;assembly=Dock.Model">
  4. <Design.PreviewWith>
  5. <Border>
  6. <PinnedDockControl />
  7. </Border>
  8. </Design.PreviewWith>
  9. <ControlTheme x:Key="{x:Type PinnedDockControl}" TargetType="PinnedDockControl">
  10. <Setter Property="PinnedDockAlignment" Value="{CompiledBinding PinnedDock.Alignment}" x:DataType="dmc:IRootDock" />
  11. <Setter Property="Template">
  12. <ControlTemplate>
  13. <Grid Name="PART_PinnedDockGrid"
  14. IsVisible="{Binding !PinnedDock.IsEmpty, FallbackValue=False}"
  15. x:DataType="dmc:IRootDock"
  16. x:CompileBindings="True">
  17. <ContentControl Content="{Binding PinnedDock}" Name="PART_PinnedDock">
  18. <ContentControl.Styles>
  19. <Style Selector="ToolDockControl">
  20. <Setter Property="Background">
  21. <MultiBinding Converter="{x:Static EitherNotNullConverter.Instance}">
  22. <CompiledBinding Path="$parent[Window].Background" />
  23. <CompiledBinding Path="$parent[Window].TransparencyBackgroundFallback" />
  24. </MultiBinding>
  25. </Setter>
  26. </Style>
  27. <Style Selector="ToolControl">
  28. <Setter Property="IsHitTestVisible" Value="{CompiledBinding !$parent[DockControl].IsDraggingDock}" />
  29. </Style>
  30. </ContentControl.Styles>
  31. </ContentControl>
  32. <GridSplitter Width="5" Grid.Column="1" Grid.Row="1" Background="Transparent" />
  33. </Grid>
  34. </ControlTemplate>
  35. </Setter>
  36. </ControlTheme>
  37. </ResourceDictionary>