feat: upgrade to 11.3.7, implement splitview changes.

This commit is contained in:
rabbitism
2025-10-04 10:48:38 +08:00
parent 7ccb6fd41a
commit 975d14a36f
5 changed files with 402 additions and 228 deletions

View File

@@ -1,7 +1,7 @@
<Project> <Project>
<PropertyGroup> <PropertyGroup>
<AvaloniaVersion>11.3.0</AvaloniaVersion> <AvaloniaVersion>11.3.7</AvaloniaVersion>
<DataGridVersion>11.3.0</DataGridVersion> <DataGridVersion>11.3.7</DataGridVersion>
<CommunityToolkitVersion>8.4.0</CommunityToolkitVersion> <CommunityToolkitVersion>8.4.0</CommunityToolkitVersion>
</PropertyGroup> </PropertyGroup>
</Project> </Project>

View File

@@ -7,277 +7,186 @@
xmlns:vm="clr-namespace:Semi.Avalonia.Demo.ViewModels" xmlns:vm="clr-namespace:Semi.Avalonia.Demo.ViewModels"
d:DesignHeight="1000" d:DesignHeight="1000"
d:DesignWidth="800" d:DesignWidth="800"
mc:Ignorable="d" x:DataType="vm:SplitViewDemoViewModel"
x:DataType="vm:SplitViewDemoViewModel"> mc:Ignorable="d">
<Design.DataContext> <Design.DataContext>
<vm:SplitViewDemoViewModel /> <vm:SplitViewDemoViewModel />
</Design.DataContext> </Design.DataContext>
<Border> <Border>
<Grid ColumnDefinitions="*,400"> <Grid ColumnDefinitions="*,400">
<Border Grid.Column="1" VerticalAlignment="Top" Margin="10 0 0 0"> <Border
<Grid RowDefinitions="*, *, *, *, *, *" ColumnDefinitions="Auto, *"> Grid.Column="1"
Margin="10,0,0,0"
VerticalAlignment="Top">
<Grid ColumnDefinitions="Auto, *" RowDefinitions="*, *, *, *, *, *">
<Label <Label
Grid.Row="0" Grid.Column="0" Grid.Row="0"
Grid.Column="0"
VerticalAlignment="Center" VerticalAlignment="Center"
Content="IsPaneOpen" /> Content="IsPaneOpen" />
<ToggleSwitch <ToggleSwitch
Grid.Row="0" Grid.Column="1" Name="PaneOpenButton"
Name="PaneOpenButton" /> Grid.Row="0"
Grid.Column="1" />
<Label <Label
Grid.Row="1" Grid.Column="0" Grid.Row="1"
Grid.Column="0"
VerticalAlignment="Center" VerticalAlignment="Center"
Content="UseLightDismissOverlayMode" /> Content="UseLightDismissOverlayMode" />
<ToggleSwitch <ToggleSwitch
Grid.Row="1" Grid.Column="1" Name="UseLightDismissOverlayModeButton"
Name="UseLightDismissOverlayModeButton" /> Grid.Row="1"
Grid.Column="1" />
<Label <Label
Grid.Row="2" Grid.Column="0" Grid.Row="2"
Grid.Column="0"
VerticalAlignment="Center" VerticalAlignment="Center"
Content="Placement" /> Content="Placement" />
<ToggleSwitch <ComboBox
Grid.Row="2" Grid.Column="1" Grid.Row="2"
Name="PanePlacementButton" Grid.Column="1"
OffContent="Left" Name="PanelPlacementSelector"
OnContent="Right" /> ItemsSource="{x:Static vm:SplitViewDemoViewModel.Placements}"
SelectedItem="{x:Static SplitViewPanePlacement.Left}"
/>
<Label <Label
Grid.Row="3" Grid.Column="0" Grid.Row="3"
Grid.Column="0"
VerticalAlignment="Center" VerticalAlignment="Center"
Content="DisplayMode" /> Content="DisplayMode" />
<ComboBox <ComboBox
Grid.Row="3" Grid.Column="1"
Name="DisplayModeSelector" Name="DisplayModeSelector"
Grid.Row="3"
Grid.Column="1"
HorizontalAlignment="Stretch" HorizontalAlignment="Stretch"
ItemsSource="{x:Static vm:SplitViewDemoViewModel.DisplayModes}" ItemsSource="{x:Static vm:SplitViewDemoViewModel.DisplayModes}"
SelectedItem="{x:Static SplitViewDisplayMode.CompactInline}" /> SelectedItem="{x:Static SplitViewDisplayMode.CompactInline}" />
<Label <Label
Grid.Row="4" Grid.Column="0" Grid.Row="4"
Grid.Column="0"
VerticalAlignment="Center" VerticalAlignment="Center"
Content="{Binding #CompactPaneLengthSlider.Value, StringFormat='{}CompactPaneLength: {0}'}" /> Content="{Binding #CompactPaneLengthSlider.Value, StringFormat='{}CompactPaneLength: {0}'}" />
<Slider <Slider
Grid.Row="4" Grid.Column="1"
Name="CompactPaneLengthSlider" Name="CompactPaneLengthSlider"
Grid.Row="4"
Grid.Column="1"
IsSnapToTickEnabled="True"
Maximum="128" Maximum="128"
Minimum="0" Minimum="0"
TickFrequency="1" TickFrequency="1"
IsSnapToTickEnabled="True"
Value="48" /> Value="48" />
<Label <Label
Grid.Row="5" Grid.Column="0" Grid.Row="5"
Grid.Column="0"
VerticalAlignment="Center" VerticalAlignment="Center"
Content="{Binding #OpenPaneLengthSlider.Value,StringFormat='{}OpenPaneLength: {0}'}" /> Content="{Binding #OpenPaneLengthSlider.Value, StringFormat='{}OpenPaneLength: {0}'}" />
<Slider <Slider
Grid.Row="5" Grid.Column="1"
Name="OpenPaneLengthSlider" Name="OpenPaneLengthSlider"
Grid.Row="5"
Grid.Column="1"
IsSnapToTickEnabled="True"
Maximum="500" Maximum="500"
Minimum="128" Minimum="128"
TickFrequency="1" TickFrequency="1"
IsSnapToTickEnabled="True"
Value="256" /> Value="256" />
</Grid> </Grid>
</Border> </Border>
<TabControl Grid.Column="0"> <SplitView
<TabItem Header="Default"> Grid.Column="0"
<Border Name="SplitView"
BorderBrush="{DynamicResource SemiGrey1}" CompactPaneLength="{Binding #CompactPaneLengthSlider.Value}"
BorderThickness="1"> DisplayMode="{Binding #DisplayModeSelector.SelectedItem}"
<SplitView IsPaneOpen="{Binding #PaneOpenButton.IsChecked, Mode=TwoWay}"
Name="SplitView" OpenPaneLength="{Binding #OpenPaneLengthSlider.Value}"
IsPaneOpen="{Binding #PaneOpenButton.IsChecked,Mode=TwoWay}" PanePlacement="{Binding #PanelPlacementSelector.SelectedItem}"
UseLightDismissOverlayMode="{Binding #UseLightDismissOverlayModeButton.IsChecked}" UseLightDismissOverlayMode="{Binding #UseLightDismissOverlayModeButton.IsChecked}">
PanePlacement="{Binding #PanePlacementButton.IsChecked}" <SplitView.Background>
DisplayMode="{Binding #DisplayModeSelector.SelectedItem}" <LinearGradientBrush StartPoint="0%,0%" EndPoint="0%,100%">
CompactPaneLength="{Binding #CompactPaneLengthSlider.Value}" <GradientStop Offset="0" Color="#6b4c1b" />
OpenPaneLength="{Binding #OpenPaneLengthSlider.Value}"> <GradientStop Offset="1" Color="#291e10" />
<SplitView.Background> </LinearGradientBrush>
<LinearGradientBrush StartPoint="0%,0%" EndPoint="0%,100%"> </SplitView.Background>
<GradientStop Color="#6b4c1b" Offset="0" /> <SplitView.Pane>
<GradientStop Color="#291e10" Offset="1" /> <Grid RowDefinitions="Auto,*,Auto">
</LinearGradientBrush> <StackPanel Grid.Row="0" Orientation="Horizontal" Margin="8 12">
</SplitView.Background> <ToggleSwitch
<SplitView.Pane> Content="{StaticResource SemiIconSidebar}"
<Grid RowDefinitions="Auto,*,Auto"> IsChecked="{Binding #SplitView.IsPaneOpen}"
<TextBlock Theme="{DynamicResource IconBorderlessToggleSwitch}" />
Grid.Row="0" <TextBlock
Name="PaneHeader" Name="PaneHeader"
Margin="8,12" VerticalAlignment="Center"
FontWeight="Bold" Margin="8 0"
Text="Playlist" /> FontWeight="Bold"
<ListBox Text="Playlist" />
Grid.Row="1" </StackPanel>
ItemsSource="{Binding Songs}" />
<ToggleSwitch
Grid.Row="2"
Theme="{DynamicResource IconBorderlessToggleSwitch}"
Content="{StaticResource SemiIconSidebar}"
HorizontalAlignment="Left"
IsChecked="{Binding #SplitView.IsPaneOpen}" />
</Grid>
</SplitView.Pane>
<Panel> <ListBox Grid.Row="1" ItemsSource="{Binding Songs}" />
<Panel.Styles>
<Style Selector="Image#AlbumCover">
<Style.Animations>
<Animation IterationCount="Infinite" Duration="0:0:40">
<KeyFrame Cue="0%">
<Setter Property="RotateTransform.Angle" Value="0" />
</KeyFrame>
<KeyFrame Cue="100%">
<Setter Property="RotateTransform.Angle" Value="360" />
</KeyFrame>
</Animation>
</Style.Animations>
</Style>
</Panel.Styles>
<Image
Source="/Assets/WORLD.png"
Name="AlbumCover"
Width="200"
Height="200" />
<Arc
Width="290"
Height="290"
StartAngle="0"
SweepAngle="360"
StrokeJoin="Round"
StrokeLineCap="Round"
StrokeThickness="45">
<Arc.Stroke>
<LinearGradientBrush StartPoint="0%,0%" EndPoint="100%,0%">
<GradientStop Color="#010101" Offset="0" />
<GradientStop Color="#363636" Offset="0.5" />
<GradientStop Color="#010101" Offset="1" />
</LinearGradientBrush>
</Arc.Stroke>
</Arc>
<Arc
Width="294"
Height="294"
StartAngle="0"
SweepAngle="360"
StrokeJoin="Round"
StrokeLineCap="Round"
StrokeThickness="4"
Stroke="Black" />
<Arc
Width="310"
Height="310"
StartAngle="0"
SweepAngle="360"
StrokeJoin="Round"
StrokeLineCap="Round"
StrokeThickness="10"
Stroke="#C6CACD"
Opacity="0.1" />
</Panel>
</SplitView> </Grid>
</Border> </SplitView.Pane>
</TabItem>
<TabItem Header="VerticalSplitView">
<Border
BorderBrush="{DynamicResource SemiGrey1}"
BorderThickness="1">
<SplitView
Name="SplitView2"
Theme="{DynamicResource VerticalSplitView}"
IsPaneOpen="{Binding #PaneOpenButton.IsChecked,Mode=TwoWay}"
UseLightDismissOverlayMode="{Binding #UseLightDismissOverlayModeButton.IsChecked}"
PanePlacement="{Binding #PanePlacementButton.IsChecked}"
DisplayMode="{Binding #DisplayModeSelector.SelectedItem}"
CompactPaneLength="{Binding #CompactPaneLengthSlider.Value}"
OpenPaneLength="{Binding #OpenPaneLengthSlider.Value}">
<SplitView.Background>
<LinearGradientBrush StartPoint="0%,0%" EndPoint="0%,100%">
<GradientStop Color="#6b4c1b" Offset="0" />
<GradientStop Color="#291e10" Offset="1" />
</LinearGradientBrush>
</SplitView.Background>
<SplitView.Pane>
<Grid RowDefinitions="Auto,Auto,*">
<ToggleSwitch
Grid.Row="0"
Theme="{DynamicResource IconBorderlessToggleSwitch}"
Content="{StaticResource SemiIconSidebar}"
HorizontalAlignment="Left"
IsChecked="{Binding #SplitView2.IsPaneOpen}" />
<TextBlock
Grid.Row="1"
Margin="8,12"
FontWeight="Bold"
Text="Playlist" />
<ListBox
Grid.Row="2"
ItemsSource="{Binding Songs}" />
</Grid>
</SplitView.Pane>
<Panel> <Panel>
<Panel.Styles> <Panel.Styles>
<Style Selector="Image#AlbumCover2"> <Style Selector="Image#AlbumCover">
<Style.Animations> <Style.Animations>
<Animation IterationCount="Infinite" Duration="0:0:40"> <Animation IterationCount="Infinite" Duration="0:0:40">
<KeyFrame Cue="0%"> <KeyFrame Cue="0%">
<Setter Property="RotateTransform.Angle" Value="0" /> <Setter Property="RotateTransform.Angle" Value="0" />
</KeyFrame> </KeyFrame>
<KeyFrame Cue="100%"> <KeyFrame Cue="100%">
<Setter Property="RotateTransform.Angle" Value="360" /> <Setter Property="RotateTransform.Angle" Value="360" />
</KeyFrame> </KeyFrame>
</Animation> </Animation>
</Style.Animations> </Style.Animations>
</Style> </Style>
</Panel.Styles> </Panel.Styles>
<Image <Image
Source="/Assets/WORLD.png" Name="AlbumCover"
Name="AlbumCover2" Width="200"
Width="200" Height="200"
Height="200" /> Source="/Assets/WORLD.png" />
<Arc <Arc
Width="290" Width="290"
Height="290" Height="290"
StartAngle="0" StartAngle="0"
SweepAngle="360" StrokeJoin="Round"
StrokeJoin="Round" StrokeLineCap="Round"
StrokeLineCap="Round" StrokeThickness="45"
StrokeThickness="45"> SweepAngle="360">
<Arc.Stroke> <Arc.Stroke>
<LinearGradientBrush StartPoint="0%,0%" EndPoint="100%,0%"> <LinearGradientBrush StartPoint="0%,0%" EndPoint="100%,0%">
<GradientStop Color="#010101" Offset="0" /> <GradientStop Offset="0" Color="#010101" />
<GradientStop Color="#363636" Offset="0.5" /> <GradientStop Offset="0.5" Color="#363636" />
<GradientStop Color="#010101" Offset="1" /> <GradientStop Offset="1" Color="#010101" />
</LinearGradientBrush> </LinearGradientBrush>
</Arc.Stroke> </Arc.Stroke>
</Arc> </Arc>
<Arc <Arc
Width="294" Width="294"
Height="294" Height="294"
StartAngle="0" StartAngle="0"
SweepAngle="360" Stroke="Black"
StrokeJoin="Round" StrokeJoin="Round"
StrokeLineCap="Round" StrokeLineCap="Round"
StrokeThickness="4" StrokeThickness="4"
Stroke="Black" /> SweepAngle="360" />
<Arc <Arc
Width="310" Width="310"
Height="310" Height="310"
StartAngle="0" Opacity="0.1"
SweepAngle="360" StartAngle="0"
StrokeJoin="Round" Stroke="#C6CACD"
StrokeLineCap="Round" StrokeJoin="Round"
StrokeThickness="10" StrokeLineCap="Round"
Stroke="#C6CACD" StrokeThickness="10"
Opacity="0.1" /> SweepAngle="360" />
</Panel> </Panel>
</SplitView>
</SplitView>
</Border>
</TabItem>
</TabControl>
</Grid> </Grid>
</Border> </Border>
</UserControl> </UserControl>

View File

@@ -26,4 +26,12 @@ public class SplitViewDemoViewModel : ObservableObject
SplitViewDisplayMode.Overlay, SplitViewDisplayMode.Overlay,
SplitViewDisplayMode.CompactOverlay, SplitViewDisplayMode.CompactOverlay,
]; ];
public static ObservableCollection<SplitViewPanePlacement> Placements { get; set; } =
[
SplitViewPanePlacement.Left,
SplitViewPanePlacement.Right,
SplitViewPanePlacement.Top,
SplitViewPanePlacement.Bottom
];
} }

View File

@@ -10,7 +10,7 @@
<PackageLicenseExpression>MIT</PackageLicenseExpression> <PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageIcon>irihi.png</PackageIcon> <PackageIcon>irihi.png</PackageIcon>
<PackageProjectUrl>https://github.com/irihitech/Semi.Avalonia</PackageProjectUrl> <PackageProjectUrl>https://github.com/irihitech/Semi.Avalonia</PackageProjectUrl>
<AvaloniaVersion>11.2.1</AvaloniaVersion> <AvaloniaVersion>11.3.7</AvaloniaVersion>
<AvaloniaUseCompiledBindingsByDefault>true</AvaloniaUseCompiledBindingsByDefault> <AvaloniaUseCompiledBindingsByDefault>true</AvaloniaUseCompiledBindingsByDefault>
</PropertyGroup> </PropertyGroup>

View File

@@ -185,8 +185,197 @@
</Style> </Style>
</Style> </Style>
<Style Selector="^:top">
<Setter Property="Template">
<ControlTemplate TargetType="SplitView">
<Grid Name="Container" Background="{TemplateBinding Background}">
<Grid.RowDefinitions>
<!-- why is this throwing a binding error? -->
<RowDefinition
Height="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplateSettings.PaneColumnGridLength}" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<Panel
Name="PART_PaneRoot"
VerticalAlignment="Top"
Background="{TemplateBinding PaneBackground}"
ClipToBounds="True"
ZIndex="100">
<ContentPresenter
Name="PART_PanePresenter"
Content="{TemplateBinding Pane}"
ContentTemplate="{TemplateBinding PaneTemplate}" />
<Rectangle
Name="HCPaneBorder"
Height="1"
VerticalAlignment="Bottom"
Fill="{DynamicResource SplitViewSeparatorBackground}" />
</Panel>
<Panel Name="ContentRoot">
<ContentPresenter
Name="PART_ContentPresenter"
Content="{TemplateBinding Content}"
ContentTemplate="{TemplateBinding ContentTemplate}" />
<Rectangle
Name="LightDismissLayer"
Fill="Transparent"
IsVisible="False" />
</Panel>
</Grid>
</ControlTemplate>
</Setter>
<Style Selector="^:overlay">
<Style Selector="^ /template/ Panel#PART_PaneRoot">
<Setter Property="Height"
Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplateSettings.ClosedPaneWidth}" />
<Setter Property="Grid.RowSpan" Value="1" />
<Setter Property="Grid.Row" Value="0" />
</Style>
<Style Selector="^ /template/ Panel#ContentRoot">
<Setter Property="Grid.Row" Value="1" />
<Setter Property="Grid.RowSpan" Value="2" />
</Style>
</Style>
<Style Selector="^:compactinline">
<Style Selector="^ /template/ Panel#PART_PaneRoot">
<Setter Property="Grid.RowSpan" Value="1" />
<Setter Property="Grid.Row" Value="0" />
<Setter Property="Height"
Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplateSettings.ClosedPaneWidth}" />
</Style>
<Style Selector="^ /template/ Panel#ContentRoot">
<Setter Property="Grid.Row" Value="1" />
<Setter Property="Grid.RowSpan" Value="1" />
</Style>
</Style>
<Style Selector="^:compactoverlay">
<Style Selector="^ /template/ Panel#PART_PaneRoot">
<!-- RowSpan should be 2 -->
<Setter Property="Grid.RowSpan" Value="1" />
<Setter Property="Grid.Row" Value="0" />
<Setter Property="Height"
Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplateSettings.ClosedPaneWidth}" />
</Style>
<Style Selector="^ /template/ Panel#ContentRoot">
<Setter Property="Grid.Row" Value="1" />
<Setter Property="Grid.RowSpan" Value="1" />
</Style>
</Style>
<Style Selector="^:inline">
<Style Selector="^ /template/ Panel#PART_PaneRoot">
<Setter Property="Grid.RowSpan" Value="1" />
<Setter Property="Grid.Row" Value="0" />
<Setter Property="Height"
Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplateSettings.ClosedPaneWidth}" />
</Style>
<Style Selector="^ /template/ Panel#ContentRoot">
<Setter Property="Grid.Row" Value="1" />
<Setter Property="Grid.RowSpan" Value="1" />
</Style>
</Style>
</Style>
<Style Selector="^:bottom">
<Setter Property="Template">
<ControlTemplate>
<Grid Name="Container" Background="{TemplateBinding Background}">
<Grid.RowDefinitions>
<RowDefinition Height="*" />
<RowDefinition
Height="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplateSettings.PaneColumnGridLength}" />
</Grid.RowDefinitions>
<Panel
Name="PART_PaneRoot"
VerticalAlignment="Bottom"
Background="{TemplateBinding PaneBackground}"
ClipToBounds="True"
ZIndex="100">
<ContentPresenter
Name="PART_PanePresenter"
Content="{TemplateBinding Pane}"
ContentTemplate="{TemplateBinding PaneTemplate}" />
<Rectangle
Name="HCPaneBorder"
Height="1"
VerticalAlignment="Top"
Fill="{DynamicResource SplitViewSeparatorBackground}" />
</Panel>
<Panel Name="ContentRoot">
<ContentPresenter
Name="PART_ContentPresenter"
Content="{TemplateBinding Content}"
ContentTemplate="{TemplateBinding ContentTemplate}" />
<Rectangle Name="LightDismissLayer" IsVisible="False" />
</Panel>
</Grid>
</ControlTemplate>
</Setter>
<Style Selector="^:overlay">
<Style Selector="^ /template/ Panel#PART_PaneRoot">
<Setter Property="Height"
Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplateSettings.ClosedPaneWidth}" />
<Setter Property="Grid.RowSpan" Value="2" />
<Setter Property="Grid.Row" Value="1" />
</Style>
<Style Selector="^ /template/ Panel#ContentRoot">
<Setter Property="Grid.Row" Value="0" />
<Setter Property="Grid.RowSpan" Value="2" />
</Style>
</Style>
<Style Selector="^:compactinline">
<Style Selector="^ /template/ Panel#PART_PaneRoot">
<Setter Property="Grid.RowSpan" Value="1" />
<Setter Property="Grid.Row" Value="1" />
<Setter Property="Height"
Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplateSettings.ClosedPaneWidth}" />
</Style>
<Style Selector="^ /template/ Panel#ContentRoot">
<Setter Property="Grid.Row" Value="0" />
<Setter Property="Grid.RowSpan" Value="1" />
</Style>
</Style>
<Style Selector="^:compactoverlay">
<Style Selector="^ /template/ Panel#PART_PaneRoot">
<Setter Property="Grid.RowSpan" Value="2" />
<Setter Property="Grid.Row" Value="1" />
<Setter Property="Height"
Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplateSettings.ClosedPaneWidth}" />
</Style>
<Style Selector="^ /template/ Panel#ContentRoot">
<Setter Property="Grid.Row" Value="0" />
<Setter Property="Grid.RowSpan" Value="1" />
</Style>
</Style>
<Style Selector="^:inline">
<Style Selector="^ /template/ Panel#PART_PaneRoot">
<Setter Property="Grid.RowSpan" Value="1" />
<Setter Property="Grid.Row" Value="1" />
<Setter Property="Height"
Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplateSettings.ClosedPaneWidth}" />
</Style>
<Style Selector="^ /template/ Panel#ContentRoot">
<Setter Property="Grid.Row" Value="0" />
<Setter Property="Grid.RowSpan" Value="1" />
</Style>
</Style>
</Style>
<Style Selector="^:open"> <Style Selector="^:open">
<Style Selector="^ /template/ Panel#PART_PaneRoot"> <Style Selector="^:left /template/ Panel#PART_PaneRoot">
<Setter Property="Transitions"> <Setter Property="Transitions">
<Transitions> <Transitions>
<DoubleTransition <DoubleTransition
@@ -197,6 +386,39 @@
</Setter> </Setter>
<Setter Property="Width" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=OpenPaneLength}" /> <Setter Property="Width" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=OpenPaneLength}" />
</Style> </Style>
<Style Selector="^:right /template/ Panel#PART_PaneRoot">
<Setter Property="Transitions">
<Transitions>
<DoubleTransition
Easing="{StaticResource SplitViewPaneAnimationEasing}"
Property="Width"
Duration="{StaticResource SplitViewPaneAnimationOpenDuration}" />
</Transitions>
</Setter>
<Setter Property="Width" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=OpenPaneLength}" />
</Style>
<Style Selector="^:top /template/ Panel#PART_PaneRoot">
<Setter Property="Transitions">
<Transitions>
<DoubleTransition
Easing="{StaticResource SplitViewPaneAnimationEasing}"
Property="Height"
Duration="{StaticResource SplitViewPaneAnimationOpenDuration}" />
</Transitions>
</Setter>
<Setter Property="Height" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=OpenPaneLength}" />
</Style>
<Style Selector="^:bottom /template/ Panel#PART_PaneRoot">
<Setter Property="Transitions">
<Transitions>
<DoubleTransition
Easing="{StaticResource SplitViewPaneAnimationEasing}"
Property="Height"
Duration="{StaticResource SplitViewPaneAnimationOpenDuration}" />
</Transitions>
</Setter>
<Setter Property="Height" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=OpenPaneLength}" />
</Style>
<Style Selector="^ /template/ Rectangle#LightDismissLayer"> <Style Selector="^ /template/ Rectangle#LightDismissLayer">
<Setter Property="Transitions"> <Setter Property="Transitions">
<Transitions> <Transitions>
@@ -211,7 +433,7 @@
</Style> </Style>
<Style Selector="^:closed"> <Style Selector="^:closed">
<Style Selector="^ /template/ Panel#PART_PaneRoot"> <Style Selector="^:left /template/ Panel#PART_PaneRoot">
<Setter Property="Transitions"> <Setter Property="Transitions">
<Transitions> <Transitions>
<DoubleTransition <DoubleTransition
@@ -222,6 +444,39 @@
</Setter> </Setter>
<Setter Property="Width" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplateSettings.ClosedPaneWidth}" /> <Setter Property="Width" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplateSettings.ClosedPaneWidth}" />
</Style> </Style>
<Style Selector="^:right /template/ Panel#PART_PaneRoot">
<Setter Property="Transitions">
<Transitions>
<DoubleTransition
Easing="{StaticResource SplitViewPaneAnimationEasing}"
Property="Width"
Duration="{StaticResource SplitViewPaneAnimationCloseDuration}" />
</Transitions>
</Setter>
<Setter Property="Width" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplateSettings.ClosedPaneWidth}" />
</Style>
<Style Selector="^:top /template/ Panel#PART_PaneRoot">
<Setter Property="Transitions">
<Transitions>
<DoubleTransition
Easing="{StaticResource SplitViewPaneAnimationEasing}"
Property="Height"
Duration="{StaticResource SplitViewPaneAnimationCloseDuration}" />
</Transitions>
</Setter>
<Setter Property="Height" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplateSettings.ClosedPaneWidth}" />
</Style>
<Style Selector="^:bottom /template/ Panel#PART_PaneRoot">
<Setter Property="Transitions">
<Transitions>
<DoubleTransition
Easing="{StaticResource SplitViewPaneAnimationEasing}"
Property="Height"
Duration="{StaticResource SplitViewPaneAnimationCloseDuration}" />
</Transitions>
</Setter>
<Setter Property="Height" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplateSettings.ClosedPaneWidth}" />
</Style>
<Style Selector="^ /template/ Rectangle#LightDismissLayer"> <Style Selector="^ /template/ Rectangle#LightDismissLayer">
<Setter Property="Transitions"> <Setter Property="Transitions">
<Transitions> <Transitions>
@@ -245,6 +500,8 @@
<Setter Property="IsVisible" Value="True" /> <Setter Property="IsVisible" Value="True" />
</Style> </Style>
</ControlTheme> </ControlTheme>
<!-- Obsolete after Avalonia 11.3.7 -->
<ControlTheme x:Key="VerticalSplitView" TargetType="SplitView"> <ControlTheme x:Key="VerticalSplitView" TargetType="SplitView">
<Setter Property="OpenPaneLength" Value="{DynamicResource SplitViewOpenPaneThemeLength}" /> <Setter Property="OpenPaneLength" Value="{DynamicResource SplitViewOpenPaneThemeLength}" />
<Setter Property="CompactPaneLength" Value="{DynamicResource SplitViewCompactPaneThemeLength}" /> <Setter Property="CompactPaneLength" Value="{DynamicResource SplitViewCompactPaneThemeLength}" />