DockTarget.axaml 7.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181
  1. <ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
  2. <Design.PreviewWith>
  3. <Panel Height="300" Width="300">
  4. <DockTarget>
  5. <DockTarget.Styles>
  6. <Style Selector="^/template/ Panel#PART_TopIndicator">
  7. <Setter Property="Opacity" Value="0.0" />
  8. </Style>
  9. <Style Selector="^/template/ Panel#PART_BottomIndicator">
  10. <Setter Property="Opacity" Value="0.0" />
  11. </Style>
  12. <Style Selector="^/template/ Panel#PART_LeftIndicator">
  13. <Setter Property="Opacity" Value="0.0" />
  14. </Style>
  15. <Style Selector="^/template/ Panel#PART_RightIndicator">
  16. <Setter Property="Opacity" Value="0.0" />
  17. </Style>
  18. <Style Selector="^/template/ Panel#PART_CenterIndicator">
  19. <Setter Property="Opacity" Value="0.0" />
  20. </Style>
  21. </DockTarget.Styles>
  22. </DockTarget>
  23. </Panel>
  24. </Design.PreviewWith>
  25. <ControlTheme TargetType="DockTarget" x:Key="{x:Type DockTarget}">
  26. <Setter Property="Template">
  27. <ControlTemplate>
  28. <Grid
  29. ColumnDefinitions="*,*"
  30. RowDefinitions="*,*"
  31. x:CompileBindings="True"
  32. x:Name="PART_IndicatorGrid">
  33. <Border
  34. ClipToBounds="True"
  35. CornerRadius="16"
  36. Grid.Column="0"
  37. Grid.ColumnSpan="2"
  38. Grid.Row="0">
  39. <Panel x:Name="PART_TopIndicator" />
  40. </Border>
  41. <Border
  42. ClipToBounds="True"
  43. CornerRadius="16"
  44. Grid.Column="0"
  45. Grid.ColumnSpan="2"
  46. Grid.Row="1">
  47. <Panel x:Name="PART_BottomIndicator" />
  48. </Border>
  49. <Border
  50. ClipToBounds="True"
  51. CornerRadius="16"
  52. Grid.Column="0"
  53. Grid.Row="0"
  54. Grid.RowSpan="2">
  55. <Panel
  56. Grid.Column="0"
  57. Grid.Row="0"
  58. Grid.RowSpan="2"
  59. x:Name="PART_LeftIndicator" />
  60. </Border>
  61. <Border
  62. ClipToBounds="True"
  63. CornerRadius="16"
  64. Grid.Column="1"
  65. Grid.Row="0"
  66. Grid.RowSpan="2">
  67. <Panel x:Name="PART_RightIndicator" />
  68. </Border>
  69. <Border
  70. ClipToBounds="True"
  71. CornerRadius="16"
  72. Grid.Column="0"
  73. Grid.ColumnSpan="2"
  74. Grid.Row="0"
  75. Grid.RowSpan="2">
  76. <Panel x:Name="PART_CenterIndicator" />
  77. </Border>
  78. <Border
  79. ClipToBounds="True"
  80. CornerRadius="16"
  81. Grid.Column="0"
  82. Grid.ColumnSpan="2"
  83. Grid.Row="0"
  84. Grid.RowSpan="2">
  85. <Panel x:Name="PART_SelectorPanel">
  86. <Grid
  87. ColumnDefinitions="*,*,*"
  88. RowDefinitions="*,*,*"
  89. x:Name="PART_SelectorGrid">
  90. <Image
  91. Grid.Column="1"
  92. Grid.Row="0"
  93. x:Name="PART_TopSelector" />
  94. <Image
  95. Grid.Column="1"
  96. Grid.Row="2"
  97. x:Name="PART_BottomSelector" />
  98. <Image
  99. Grid.Column="0"
  100. Grid.Row="1"
  101. x:Name="PART_LeftSelector" />
  102. <Image
  103. Grid.Column="2"
  104. Grid.Row="1"
  105. x:Name="PART_RightSelector" />
  106. <Image
  107. Grid.Column="1"
  108. Grid.Row="1"
  109. x:Name="PART_CenterSelector" />
  110. </Grid>
  111. </Panel>
  112. </Border>
  113. </Grid>
  114. </ControlTemplate>
  115. </Setter>
  116. <Style Selector="^/template/ Grid#PART_SelectorGrid">
  117. <Setter Property="MaxWidth" Value="125" />
  118. <Setter Property="MaxHeight" Value="125" />
  119. </Style>
  120. <Style Selector="^/template/ Panel#PART_TopIndicator">
  121. <Setter Property="Background" Value="{DynamicResource SukiPrimaryColor25}" />
  122. <Setter Property="Opacity" Value="0" />
  123. </Style>
  124. <Style Selector="^/template/ Panel#PART_BottomIndicator">
  125. <Setter Property="Background" Value="{DynamicResource SukiPrimaryColor25}" />
  126. <Setter Property="Opacity" Value="0" />
  127. </Style>
  128. <Style Selector="^/template/ Panel#PART_LeftIndicator">
  129. <Setter Property="Background" Value="{DynamicResource SukiPrimaryColor25}" />
  130. <Setter Property="Opacity" Value="0" />
  131. </Style>
  132. <Style Selector="^/template/ Panel#PART_RightIndicator">
  133. <Setter Property="Background" Value="{DynamicResource SukiPrimaryColor25}" />
  134. <Setter Property="Opacity" Value="0" />
  135. </Style>
  136. <Style Selector="^/template/ Panel#PART_CenterIndicator">
  137. <Setter Property="Background" Value="{DynamicResource SukiPrimaryColor25}" />
  138. <Setter Property="Opacity" Value="0" />
  139. </Style>
  140. <Style Selector="^/template/ Image#PART_TopSelector">
  141. <Setter Property="Source" Value="avares://Dock.Avalonia/Assets/DockAnchorableTop.png" />
  142. <Setter Property="Width" Value="40" />
  143. <Setter Property="Height" Value="40" />
  144. </Style>
  145. <Style Selector="^/template/ Image#PART_BottomSelector">
  146. <Setter Property="Source" Value="avares://Dock.Avalonia/Assets/DockAnchorableBottom.png" />
  147. <Setter Property="Width" Value="40" />
  148. <Setter Property="Height" Value="40" />
  149. </Style>
  150. <Style Selector="^/template/ Image#PART_LeftSelector">
  151. <Setter Property="Source" Value="avares://Dock.Avalonia/Assets/DockAnchorableLeft.png" />
  152. <Setter Property="Width" Value="40" />
  153. <Setter Property="Height" Value="40" />
  154. </Style>
  155. <Style Selector="^/template/ Image#PART_RightSelector">
  156. <Setter Property="Source" Value="avares://Dock.Avalonia/Assets/DockAnchorableRight.png" />
  157. <Setter Property="Width" Value="40" />
  158. <Setter Property="Height" Value="40" />
  159. </Style>
  160. <Style Selector="^/template/ Image#PART_CenterSelector">
  161. <Setter Property="Source" Value="avares://Dock.Avalonia/Assets/DockDocumentInside.png" />
  162. <Setter Property="Width" Value="40" />
  163. <Setter Property="Height" Value="40" />
  164. </Style>
  165. </ControlTheme>
  166. </ResourceDictionary>