ToolDockControl.axaml 3.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. <ResourceDictionary xmlns="https://github.com/avaloniaui"
  2. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  3. xmlns:suki="https://github.com/kikipoulet/SukiUI"
  4. xmlns:converters="clr-namespace:Dock.Avalonia.Converters"
  5. xmlns:core="using:Dock.Model.Core">
  6. <Design.PreviewWith>
  7. <ToolDockControl Width="300" Height="300" />
  8. </Design.PreviewWith>
  9. <ControlTheme x:Key="{x:Type ToolDockControl}" TargetType="ToolDockControl">
  10. <Setter Property="Template">
  11. <ControlTemplate>
  12. <Panel>
  13. <Border Margin="8"
  14. BoxShadow="{DynamicResource SukiPopupShadow}"
  15. CornerRadius="20"
  16. IsVisible="{TemplateBinding Background,
  17. Converter={x:Static converters:TransparentToTrueConverter.Instance}}" />
  18. <suki:GlassCard Margin="5" Padding="0">
  19. <Panel>
  20. <Panel IsVisible="{TemplateBinding Background, Converter={x:Static converters:TransparentToTrueConverter.Instance}}">
  21. <Panel Background="{DynamicResource SukiCardBackground}" />
  22. <Panel Margin="0">
  23. <Panel.Background>
  24. <LinearGradientBrush StartPoint="0%,0%" EndPoint="100%,100%">
  25. <GradientStop Offset="0" Color="{DynamicResource SukiAccentColor5}" />
  26. <GradientStop Offset="1" Color="{DynamicResource SukiPrimaryColor10}" />
  27. </LinearGradientBrush>
  28. </Panel.Background>
  29. </Panel>
  30. </Panel>
  31. <DockableControl Name="PART_DockableControl"
  32. Margin="12,15"
  33. x:DataType="core:IDock"
  34. Background="Transparent"
  35. TrackingMode="Visible">
  36. <ToolChromeControl x:DataType="core:IDock"
  37. IsActive="{Binding IsActive}"
  38. IsVisible="{Binding !!VisibleDockables.Count}">
  39. <ToolControl />
  40. </ToolChromeControl>
  41. </DockableControl>
  42. </Panel>
  43. </suki:GlassCard>
  44. </Panel>
  45. </ControlTemplate>
  46. </Setter>
  47. <!--
  48. <Style Selector="^[(ProportionalStackPanelSplitter.IsEmpty)=False] /template/ DockableControl#PART_DockableControl">
  49. <Setter Property="Background" Value="Blue" />
  50. </Style>
  51. <Style Selector="^[(ProportionalStackPanelSplitter.IsEmpty)=True] /template/ DockableControl#PART_DockableControl">
  52. <Setter Property="Background" Value="Red" />
  53. </Style>
  54. -->
  55. </ControlTheme>
  56. </ResourceDictionary>