|
1 | 1 | <Styles xmlns="https://github.com/avaloniaui" |
2 | 2 | xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
| 3 | + xmlns:ripple="clr-namespace:Material.Ripple;assembly=Material.Ripple" |
3 | 4 | xmlns:collections="clr-namespace:Avalonia.Collections;assembly=Avalonia.Controls.DataGrid"> |
4 | 5 | <!--TODO: Validation and Focus--> |
5 | 6 |
|
6 | 7 | <Styles.Resources> |
7 | 8 | <Thickness x:Key="DataGridTextColumnCellTextBlockMargin">0</Thickness> |
8 | 9 | </Styles.Resources> |
9 | 10 |
|
| 11 | + <Style Selector="ToggleButton#PART_ExpanderButton"> |
| 12 | + <Setter Property="Cursor" Value="Hand" /> |
| 13 | + <Setter Property="Focusable" Value="False" /> |
| 14 | + <Setter Property="CornerRadius" Value="16" /> |
| 15 | + <Setter Property="Width" Value="24" /> |
| 16 | + <Setter Property="Height" Value="24" /> |
| 17 | + <Setter Property="Margin" Value="4,0,0,0" /> |
| 18 | + <Setter Property="Template"> |
| 19 | + <Setter.Value> |
| 20 | + <ControlTemplate> |
| 21 | + <Border Background="Transparent" |
| 22 | + CornerRadius="{TemplateBinding CornerRadius}" |
| 23 | + ClipToBounds="True"> |
| 24 | + <ripple:RippleEffect Name="PART_Ripple" |
| 25 | + RippleFill="{TemplateBinding Foreground, |
| 26 | + Converter={StaticResource BrushRoundConverter}}"> |
| 27 | + <Panel Name="PART_InnerPanel" Width="24" Height="24"> |
| 28 | + <Path Data="M8.59,16.58L13.17,12L8.59,7.41L10,6L16,12L10,18L8.59,16.58Z" |
| 29 | + Name="ExpandPath" |
| 30 | + Fill="{TemplateBinding Foreground}" |
| 31 | + Stroke="{TemplateBinding Foreground}" /> |
| 32 | + </Panel> |
| 33 | + </ripple:RippleEffect> |
| 34 | + </Border> |
| 35 | + </ControlTemplate> |
| 36 | + </Setter.Value> |
| 37 | + </Setter> |
| 38 | + |
| 39 | + <Style Selector="^:not(.no-transitions) /template/ Panel#PART_InnerPanel"> |
| 40 | + <Setter Property="Transitions"> |
| 41 | + <Transitions> |
| 42 | + <TransformOperationsTransition Duration="0:0:0.25" Property="RenderTransform" Easing="CircularEaseOut" /> |
| 43 | + </Transitions> |
| 44 | + </Setter> |
| 45 | + </Style> |
| 46 | + |
| 47 | + <Style Selector="^ /template/ Panel#PART_InnerPanel"> |
| 48 | + <Setter Property="RenderTransform" Value="rotate(0deg)" /> |
| 49 | + </Style> |
| 50 | + |
| 51 | + <!-- Rotate the arrow to 45 degrees when group expanded --> |
| 52 | + <Style Selector="^:checked /template/ Panel#PART_InnerPanel"> |
| 53 | + <Setter Property="RenderTransform" Value="rotate(45deg)" /> |
| 54 | + </Style> |
| 55 | + </Style> |
| 56 | + |
10 | 57 | <Style Selector="DataGridCell"> |
11 | 58 | <Setter Property="Background" Value="Transparent" /> |
12 | 59 | <Setter Property="HorizontalContentAlignment" Value="Stretch" /> |
|
0 commit comments