mirror of
https://gitcode.com/gh_mirrors/se/Semi.Avalonia
synced 2026-03-03 00:00:55 +08:00
@@ -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>
|
||||||
|
|||||||
@@ -12,42 +12,46 @@
|
|||||||
<Design.DataContext>
|
<Design.DataContext>
|
||||||
<vm:ComboBoxDemoViewModel />
|
<vm:ComboBoxDemoViewModel />
|
||||||
</Design.DataContext>
|
</Design.DataContext>
|
||||||
<StackPanel Spacing="20">
|
<ScrollViewer>
|
||||||
<StackPanel.Styles>
|
<StackPanel Spacing="20">
|
||||||
<Style Selector="ComboBox">
|
<StackPanel.Styles>
|
||||||
<Setter Property="Width" Value="300" />
|
<Style Selector="ComboBox">
|
||||||
<Setter Property="ItemsSource" Value="{Binding Items}" />
|
<Setter Property="Width" Value="300" />
|
||||||
</Style>
|
<Setter Property="ItemsSource" Value="{Binding Items}" />
|
||||||
</StackPanel.Styles>
|
</Style>
|
||||||
|
</StackPanel.Styles>
|
||||||
|
|
||||||
<ComboBox />
|
<ComboBox />
|
||||||
<ComboBox Classes="ClearButton" />
|
<ComboBox Classes="ClearButton" />
|
||||||
<ComboBox PlaceholderText="Please Select" />
|
<ComboBox PlaceholderText="Please Select" />
|
||||||
<ComboBox IsEnabled="False" />
|
<ComboBox IsEnabled="False" />
|
||||||
<ComboBox Classes="Large" IsEnabled="False" />
|
<ComboBox Classes="Large" IsEnabled="False" />
|
||||||
<ComboBox Classes="Small" />
|
<ComboBox Classes="Small" />
|
||||||
<ComboBox Classes="Bordered" />
|
<ComboBox Classes="Bordered" />
|
||||||
<ComboBox Classes="Bordered" IsEnabled="False" />
|
<ComboBox Classes="Bordered" IsEnabled="False" />
|
||||||
<ComboBox>
|
<ComboBox>
|
||||||
<ComboBox.SelectionBoxItemTemplate>
|
<ComboBox.SelectionBoxItemTemplate>
|
||||||
<DataTemplate DataType="x:String">
|
<DataTemplate DataType="x:String">
|
||||||
<ContentControl BorderThickness="1"
|
<ContentControl BorderThickness="1"
|
||||||
BorderBrush="Gold"
|
BorderBrush="Gold"
|
||||||
Content="{Binding}" />
|
Content="{Binding}" />
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
</ComboBox.SelectionBoxItemTemplate>
|
</ComboBox.SelectionBoxItemTemplate>
|
||||||
</ComboBox>
|
</ComboBox>
|
||||||
|
|
||||||
<StackPanel Orientation="Horizontal">
|
<StackPanel Orientation="Horizontal">
|
||||||
<ComboBox Width="100" Classes="Large" PlaceholderText="Large" />
|
<ComboBox Width="100" Classes="Large" PlaceholderText="Large" />
|
||||||
<ComboBox Width="100" PlaceholderText="Default" />
|
<ComboBox Width="100" PlaceholderText="Default" />
|
||||||
<ComboBox Width="100" Classes="Small" PlaceholderText="Small" />
|
<ComboBox Width="100" Classes="Small" PlaceholderText="Small" />
|
||||||
|
</StackPanel>
|
||||||
|
|
||||||
|
<StackPanel Orientation="Horizontal">
|
||||||
|
<ComboBox Width="100" IsEnabled="False" PlaceholderText="Disabled" />
|
||||||
|
<ComboBox Width="100" Classes="Bordered" PlaceholderText="Bordered" />
|
||||||
|
<ComboBox Width="100" Classes="Bordered" IsEnabled="False" />
|
||||||
|
</StackPanel>
|
||||||
|
<ToggleSwitch Name="toggle" IsChecked="True" Content="IsEditable" />
|
||||||
|
<ComboBox IsEditable="{Binding #toggle.IsChecked}" />
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
</ScrollViewer>
|
||||||
<StackPanel Orientation="Horizontal">
|
|
||||||
<ComboBox Width="100" IsEnabled="False" PlaceholderText="Disabled" />
|
|
||||||
<ComboBox Width="100" Classes="Bordered" PlaceholderText="Bordered" />
|
|
||||||
<ComboBox Width="100" Classes="Bordered" IsEnabled="False" />
|
|
||||||
</StackPanel>
|
|
||||||
</StackPanel>
|
|
||||||
</UserControl>
|
</UserControl>
|
||||||
@@ -7,277 +7,187 @@
|
|||||||
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" />
|
HorizontalAlignment="Stretch"
|
||||||
|
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
|
<ListBox Grid.Row="1" ItemsSource="{Binding Songs}" />
|
||||||
Grid.Row="2"
|
|
||||||
Theme="{DynamicResource IconBorderlessToggleSwitch}"
|
</Grid>
|
||||||
Content="{StaticResource SemiIconSidebar}"
|
</SplitView.Pane>
|
||||||
HorizontalAlignment="Left"
|
|
||||||
IsChecked="{Binding #SplitView.IsPaneOpen}" />
|
|
||||||
</Grid>
|
|
||||||
</SplitView.Pane>
|
|
||||||
|
|
||||||
<Panel>
|
<Panel>
|
||||||
<Panel.Styles>
|
<Panel.Styles>
|
||||||
<Style Selector="Image#AlbumCover">
|
<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="AlbumCover"
|
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>
|
|
||||||
<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.Styles>
|
|
||||||
<Style Selector="Image#AlbumCover2">
|
|
||||||
<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="AlbumCover2"
|
|
||||||
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>
|
|
||||||
</Border>
|
|
||||||
</TabItem>
|
|
||||||
</TabControl>
|
|
||||||
</Grid>
|
</Grid>
|
||||||
</Border>
|
</Border>
|
||||||
</UserControl>
|
</UserControl>
|
||||||
@@ -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
|
||||||
|
];
|
||||||
}
|
}
|
||||||
@@ -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>
|
||||||
|
|
||||||
|
|||||||
@@ -20,7 +20,7 @@
|
|||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Avalonia.Controls.DataGrid" Version="11.2.1"/>
|
<PackageReference Include="Avalonia.Controls.DataGrid" Version="11.3.7"/>
|
||||||
<None Include="..\..\irihi.png" Pack="true" PackagePath="\" Link="Properties\irihi.png"/>
|
<None Include="..\..\irihi.png" Pack="true" PackagePath="\" Link="Properties\irihi.png"/>
|
||||||
<None Include="..\..\LICENSE" Pack="true" PackagePath="\" Link="Properties\LICENSE"/>
|
<None Include="..\..\LICENSE" Pack="true" PackagePath="\" Link="Properties\LICENSE"/>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|||||||
@@ -66,8 +66,14 @@
|
|||||||
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
|
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
|
||||||
TextTrimming="CharacterEllipsis"
|
TextTrimming="CharacterEllipsis"
|
||||||
Foreground="{TemplateBinding PlaceholderForeground}"
|
Foreground="{TemplateBinding PlaceholderForeground}"
|
||||||
IsVisible="{TemplateBinding SelectionBoxItem,Converter={x:Static ObjectConverters.IsNull}}"
|
Text="{TemplateBinding PlaceholderText}">
|
||||||
Text="{TemplateBinding PlaceholderText}" />
|
<TextBlock.IsVisible>
|
||||||
|
<MultiBinding Converter="{x:Static BoolConverters.And}">
|
||||||
|
<TemplateBinding Property="SelectionBoxItem" Converter="{x:Static ObjectConverters.IsNull}" />
|
||||||
|
<TemplateBinding Property="IsEditable" Converter="{x:Static BoolConverters.Not}" />
|
||||||
|
</MultiBinding>
|
||||||
|
</TextBlock.IsVisible>
|
||||||
|
</TextBlock>
|
||||||
<ContentPresenter
|
<ContentPresenter
|
||||||
Name="ContentPresenter"
|
Name="ContentPresenter"
|
||||||
Grid.Column="0"
|
Grid.Column="0"
|
||||||
@@ -75,7 +81,20 @@
|
|||||||
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
|
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
|
||||||
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
|
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
|
||||||
Content="{TemplateBinding SelectionBoxItem}"
|
Content="{TemplateBinding SelectionBoxItem}"
|
||||||
ContentTemplate="{TemplateBinding SelectionBoxItemTemplate}" />
|
ContentTemplate="{TemplateBinding SelectionBoxItemTemplate}"
|
||||||
|
IsVisible="{TemplateBinding IsEditable, Converter={x:Static BoolConverters.Not}}" />
|
||||||
|
<TextBox
|
||||||
|
Name="PART_EditableTextBox"
|
||||||
|
Grid.Column="0"
|
||||||
|
Theme="{StaticResource LooklessTextBox}"
|
||||||
|
Padding="{TemplateBinding Padding}"
|
||||||
|
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
|
||||||
|
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
|
||||||
|
Foreground="{TemplateBinding Foreground}"
|
||||||
|
Text="{TemplateBinding Text, Mode=TwoWay}"
|
||||||
|
Watermark="{TemplateBinding PlaceholderText}"
|
||||||
|
IsVisible="{TemplateBinding IsEditable}" />
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
Name="ClearButton"
|
Name="ClearButton"
|
||||||
Grid.Column="1"
|
Grid.Column="1"
|
||||||
@@ -211,6 +230,11 @@
|
|||||||
</Style>
|
</Style>
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
|
<Style Selector="^[IsEditable=true]">
|
||||||
|
<Setter Property="IsTabStop" Value="False" />
|
||||||
|
<Setter Property="KeyboardNavigation.TabNavigation" Value="Local" />
|
||||||
|
</Style>
|
||||||
|
|
||||||
<Style Selector="^.Bordered">
|
<Style Selector="^.Bordered">
|
||||||
<Style Selector="^ /template/ Border#Background">
|
<Style Selector="^ /template/ Border#Background">
|
||||||
<Setter Property="Background" Value="{DynamicResource ComboBoxSelectorBorderedBackground}" />
|
<Setter Property="Background" Value="{DynamicResource ComboBoxSelectorBorderedBackground}" />
|
||||||
|
|||||||
@@ -1,6 +1,4 @@
|
|||||||
<ResourceDictionary
|
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||||
xmlns="https://github.com/avaloniaui"
|
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
|
||||||
<ControlTheme x:Key="{x:Type SplitView}" TargetType="SplitView">
|
<ControlTheme x:Key="{x:Type SplitView}" 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}" />
|
||||||
@@ -100,7 +98,7 @@
|
|||||||
|
|
||||||
<Style Selector="^:right">
|
<Style Selector="^:right">
|
||||||
<Setter Property="Template">
|
<Setter Property="Template">
|
||||||
<ControlTemplate>
|
<ControlTemplate TargetType="SplitView">
|
||||||
<Grid Name="Container" Background="{TemplateBinding Background}">
|
<Grid Name="Container" Background="{TemplateBinding Background}">
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="*" />
|
<ColumnDefinition Width="*" />
|
||||||
@@ -185,79 +183,13 @@
|
|||||||
</Style>
|
</Style>
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<Style Selector="^:open">
|
<Style Selector="^:top">
|
||||||
<Style Selector="^ /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="^ /template/ Rectangle#LightDismissLayer">
|
|
||||||
<Setter Property="Transitions">
|
|
||||||
<Transitions>
|
|
||||||
<DoubleTransition
|
|
||||||
Easing="{StaticResource SplitViewPaneAnimationEasing}"
|
|
||||||
Property="Opacity"
|
|
||||||
Duration="{StaticResource SplitViewPaneAnimationOpenDuration}" />
|
|
||||||
</Transitions>
|
|
||||||
</Setter>
|
|
||||||
<Setter Property="Opacity" Value="1.0" />
|
|
||||||
</Style>
|
|
||||||
</Style>
|
|
||||||
|
|
||||||
<Style Selector="^:closed">
|
|
||||||
<Style Selector="^ /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="^ /template/ Rectangle#LightDismissLayer">
|
|
||||||
<Setter Property="Transitions">
|
|
||||||
<Transitions>
|
|
||||||
<DoubleTransition
|
|
||||||
Easing="{StaticResource SplitViewPaneAnimationEasing}"
|
|
||||||
Property="Opacity"
|
|
||||||
Duration="{StaticResource SplitViewPaneAnimationCloseDuration}" />
|
|
||||||
</Transitions>
|
|
||||||
</Setter>
|
|
||||||
<Setter Property="Opacity" Value="0.0" />
|
|
||||||
</Style>
|
|
||||||
</Style>
|
|
||||||
|
|
||||||
<Style Selector="^:lightDismiss /template/ Rectangle#LightDismissLayer">
|
|
||||||
<Setter Property="Fill" Value="{DynamicResource SplitViewMaskBrush}" />
|
|
||||||
</Style>
|
|
||||||
<Style Selector="^:overlay:open /template/ Rectangle#LightDismissLayer">
|
|
||||||
<Setter Property="IsVisible" Value="True" />
|
|
||||||
</Style>
|
|
||||||
<Style Selector="^:compactoverlay:open /template/ Rectangle#LightDismissLayer">
|
|
||||||
<Setter Property="IsVisible" Value="True" />
|
|
||||||
</Style>
|
|
||||||
</ControlTheme>
|
|
||||||
<ControlTheme x:Key="VerticalSplitView" TargetType="SplitView">
|
|
||||||
<Setter Property="OpenPaneLength" Value="{DynamicResource SplitViewOpenPaneThemeLength}" />
|
|
||||||
<Setter Property="CompactPaneLength" Value="{DynamicResource SplitViewCompactPaneThemeLength}" />
|
|
||||||
<Setter Property="PaneBackground" Value="{DynamicResource SplitViewPaneBackground}" />
|
|
||||||
|
|
||||||
<Style Selector="^:left">
|
|
||||||
<Setter Property="Template">
|
<Setter Property="Template">
|
||||||
<ControlTemplate TargetType="SplitView">
|
<ControlTemplate TargetType="SplitView">
|
||||||
<Grid Name="Container" Background="{TemplateBinding Background}">
|
<Grid Name="Container" Background="{TemplateBinding Background}">
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<!-- why is this throwing a binding error? -->
|
<!-- why is this throwing a binding error? -->
|
||||||
<RowDefinition
|
<RowDefinition Height="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplateSettings.PaneColumnGridLength}" />
|
||||||
Height="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplateSettings.PaneColumnGridLength}" />
|
|
||||||
<RowDefinition Height="*" />
|
<RowDefinition Height="*" />
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
@@ -295,8 +227,7 @@
|
|||||||
|
|
||||||
<Style Selector="^:overlay">
|
<Style Selector="^:overlay">
|
||||||
<Style Selector="^ /template/ Panel#PART_PaneRoot">
|
<Style Selector="^ /template/ Panel#PART_PaneRoot">
|
||||||
<Setter Property="Height"
|
<Setter Property="Height" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplateSettings.ClosedPaneWidth}" />
|
||||||
Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplateSettings.ClosedPaneWidth}" />
|
|
||||||
<Setter Property="Grid.RowSpan" Value="1" />
|
<Setter Property="Grid.RowSpan" Value="1" />
|
||||||
<Setter Property="Grid.Row" Value="0" />
|
<Setter Property="Grid.Row" Value="0" />
|
||||||
</Style>
|
</Style>
|
||||||
@@ -310,8 +241,7 @@
|
|||||||
<Style Selector="^ /template/ Panel#PART_PaneRoot">
|
<Style Selector="^ /template/ Panel#PART_PaneRoot">
|
||||||
<Setter Property="Grid.RowSpan" Value="1" />
|
<Setter Property="Grid.RowSpan" Value="1" />
|
||||||
<Setter Property="Grid.Row" Value="0" />
|
<Setter Property="Grid.Row" Value="0" />
|
||||||
<Setter Property="Height"
|
<Setter Property="Height" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplateSettings.ClosedPaneWidth}" />
|
||||||
Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplateSettings.ClosedPaneWidth}" />
|
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^ /template/ Panel#ContentRoot">
|
<Style Selector="^ /template/ Panel#ContentRoot">
|
||||||
<Setter Property="Grid.Row" Value="1" />
|
<Setter Property="Grid.Row" Value="1" />
|
||||||
@@ -324,8 +254,7 @@
|
|||||||
<!-- RowSpan should be 2 -->
|
<!-- RowSpan should be 2 -->
|
||||||
<Setter Property="Grid.RowSpan" Value="1" />
|
<Setter Property="Grid.RowSpan" Value="1" />
|
||||||
<Setter Property="Grid.Row" Value="0" />
|
<Setter Property="Grid.Row" Value="0" />
|
||||||
<Setter Property="Height"
|
<Setter Property="Height" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplateSettings.ClosedPaneWidth}" />
|
||||||
Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplateSettings.ClosedPaneWidth}" />
|
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^ /template/ Panel#ContentRoot">
|
<Style Selector="^ /template/ Panel#ContentRoot">
|
||||||
<Setter Property="Grid.Row" Value="1" />
|
<Setter Property="Grid.Row" Value="1" />
|
||||||
@@ -337,8 +266,322 @@
|
|||||||
<Style Selector="^ /template/ Panel#PART_PaneRoot">
|
<Style Selector="^ /template/ Panel#PART_PaneRoot">
|
||||||
<Setter Property="Grid.RowSpan" Value="1" />
|
<Setter Property="Grid.RowSpan" Value="1" />
|
||||||
<Setter Property="Grid.Row" Value="0" />
|
<Setter Property="Grid.Row" Value="0" />
|
||||||
<Setter Property="Height"
|
<Setter Property="Height" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplateSettings.ClosedPaneWidth}" />
|
||||||
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 TargetType="SplitView">
|
||||||
|
<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"
|
||||||
|
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="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="^:left /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="^: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">
|
||||||
|
<Setter Property="Transitions">
|
||||||
|
<Transitions>
|
||||||
|
<DoubleTransition
|
||||||
|
Easing="{StaticResource SplitViewPaneAnimationEasing}"
|
||||||
|
Property="Opacity"
|
||||||
|
Duration="{StaticResource SplitViewPaneAnimationOpenDuration}" />
|
||||||
|
</Transitions>
|
||||||
|
</Setter>
|
||||||
|
<Setter Property="Opacity" Value="1.0" />
|
||||||
|
</Style>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style Selector="^:closed">
|
||||||
|
<Style Selector="^:left /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="^: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">
|
||||||
|
<Setter Property="Transitions">
|
||||||
|
<Transitions>
|
||||||
|
<DoubleTransition
|
||||||
|
Easing="{StaticResource SplitViewPaneAnimationEasing}"
|
||||||
|
Property="Opacity"
|
||||||
|
Duration="{StaticResource SplitViewPaneAnimationCloseDuration}" />
|
||||||
|
</Transitions>
|
||||||
|
</Setter>
|
||||||
|
<Setter Property="Opacity" Value="0.0" />
|
||||||
|
</Style>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style Selector="^:lightDismiss /template/ Rectangle#LightDismissLayer">
|
||||||
|
<Setter Property="Fill" Value="{DynamicResource SplitViewMaskBrush}" />
|
||||||
|
</Style>
|
||||||
|
<Style Selector="^:overlay:open /template/ Rectangle#LightDismissLayer">
|
||||||
|
<Setter Property="IsVisible" Value="True" />
|
||||||
|
</Style>
|
||||||
|
<Style Selector="^:compactoverlay:open /template/ Rectangle#LightDismissLayer">
|
||||||
|
<Setter Property="IsVisible" Value="True" />
|
||||||
|
</Style>
|
||||||
|
</ControlTheme>
|
||||||
|
|
||||||
|
<!-- Obsolete after Avalonia 11.3.7 -->
|
||||||
|
<ControlTheme x:Key="VerticalSplitView" TargetType="SplitView">
|
||||||
|
<Setter Property="OpenPaneLength" Value="{DynamicResource SplitViewOpenPaneThemeLength}" />
|
||||||
|
<Setter Property="CompactPaneLength" Value="{DynamicResource SplitViewCompactPaneThemeLength}" />
|
||||||
|
<Setter Property="PaneBackground" Value="{DynamicResource SplitViewPaneBackground}" />
|
||||||
|
|
||||||
|
<Style Selector="^:left">
|
||||||
|
<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>
|
||||||
<Style Selector="^ /template/ Panel#ContentRoot">
|
<Style Selector="^ /template/ Panel#ContentRoot">
|
||||||
<Setter Property="Grid.Row" Value="1" />
|
<Setter Property="Grid.Row" Value="1" />
|
||||||
@@ -353,8 +596,7 @@
|
|||||||
<Grid Name="Container" Background="{TemplateBinding Background}">
|
<Grid Name="Container" Background="{TemplateBinding Background}">
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="*" />
|
<RowDefinition Height="*" />
|
||||||
<RowDefinition
|
<RowDefinition Height="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplateSettings.PaneColumnGridLength}" />
|
||||||
Height="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplateSettings.PaneColumnGridLength}" />
|
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
<Panel
|
<Panel
|
||||||
@@ -388,8 +630,7 @@
|
|||||||
|
|
||||||
<Style Selector="^:overlay">
|
<Style Selector="^:overlay">
|
||||||
<Style Selector="^ /template/ Panel#PART_PaneRoot">
|
<Style Selector="^ /template/ Panel#PART_PaneRoot">
|
||||||
<Setter Property="Height"
|
<Setter Property="Height" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplateSettings.ClosedPaneWidth}" />
|
||||||
Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplateSettings.ClosedPaneWidth}" />
|
|
||||||
<Setter Property="Grid.RowSpan" Value="2" />
|
<Setter Property="Grid.RowSpan" Value="2" />
|
||||||
<Setter Property="Grid.Row" Value="1" />
|
<Setter Property="Grid.Row" Value="1" />
|
||||||
</Style>
|
</Style>
|
||||||
@@ -403,8 +644,7 @@
|
|||||||
<Style Selector="^ /template/ Panel#PART_PaneRoot">
|
<Style Selector="^ /template/ Panel#PART_PaneRoot">
|
||||||
<Setter Property="Grid.RowSpan" Value="1" />
|
<Setter Property="Grid.RowSpan" Value="1" />
|
||||||
<Setter Property="Grid.Row" Value="1" />
|
<Setter Property="Grid.Row" Value="1" />
|
||||||
<Setter Property="Height"
|
<Setter Property="Height" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplateSettings.ClosedPaneWidth}" />
|
||||||
Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplateSettings.ClosedPaneWidth}" />
|
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^ /template/ Panel#ContentRoot">
|
<Style Selector="^ /template/ Panel#ContentRoot">
|
||||||
<Setter Property="Grid.Row" Value="0" />
|
<Setter Property="Grid.Row" Value="0" />
|
||||||
@@ -416,8 +656,7 @@
|
|||||||
<Style Selector="^ /template/ Panel#PART_PaneRoot">
|
<Style Selector="^ /template/ Panel#PART_PaneRoot">
|
||||||
<Setter Property="Grid.RowSpan" Value="2" />
|
<Setter Property="Grid.RowSpan" Value="2" />
|
||||||
<Setter Property="Grid.Row" Value="1" />
|
<Setter Property="Grid.Row" Value="1" />
|
||||||
<Setter Property="Height"
|
<Setter Property="Height" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplateSettings.ClosedPaneWidth}" />
|
||||||
Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplateSettings.ClosedPaneWidth}" />
|
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^ /template/ Panel#ContentRoot">
|
<Style Selector="^ /template/ Panel#ContentRoot">
|
||||||
<Setter Property="Grid.Row" Value="0" />
|
<Setter Property="Grid.Row" Value="0" />
|
||||||
@@ -429,8 +668,7 @@
|
|||||||
<Style Selector="^ /template/ Panel#PART_PaneRoot">
|
<Style Selector="^ /template/ Panel#PART_PaneRoot">
|
||||||
<Setter Property="Grid.RowSpan" Value="1" />
|
<Setter Property="Grid.RowSpan" Value="1" />
|
||||||
<Setter Property="Grid.Row" Value="1" />
|
<Setter Property="Grid.Row" Value="1" />
|
||||||
<Setter Property="Height"
|
<Setter Property="Height" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplateSettings.ClosedPaneWidth}" />
|
||||||
Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplateSettings.ClosedPaneWidth}" />
|
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^ /template/ Panel#ContentRoot">
|
<Style Selector="^ /template/ Panel#ContentRoot">
|
||||||
<Setter Property="Grid.Row" Value="0" />
|
<Setter Property="Grid.Row" Value="0" />
|
||||||
@@ -449,8 +687,7 @@
|
|||||||
Duration="{StaticResource SplitViewPaneAnimationOpenDuration}" />
|
Duration="{StaticResource SplitViewPaneAnimationOpenDuration}" />
|
||||||
</Transitions>
|
</Transitions>
|
||||||
</Setter>
|
</Setter>
|
||||||
<Setter Property="Height"
|
<Setter Property="Height" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=OpenPaneLength}" />
|
||||||
Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=OpenPaneLength}" />
|
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^ /template/ Rectangle#LightDismissLayer">
|
<Style Selector="^ /template/ Rectangle#LightDismissLayer">
|
||||||
<Setter Property="Transitions">
|
<Setter Property="Transitions">
|
||||||
@@ -475,8 +712,7 @@
|
|||||||
Duration="{StaticResource SplitViewPaneAnimationCloseDuration}" />
|
Duration="{StaticResource SplitViewPaneAnimationCloseDuration}" />
|
||||||
</Transitions>
|
</Transitions>
|
||||||
</Setter>
|
</Setter>
|
||||||
<Setter Property="Height"
|
<Setter Property="Height" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplateSettings.ClosedPaneWidth}" />
|
||||||
Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplateSettings.ClosedPaneWidth}" />
|
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^ /template/ Rectangle#LightDismissLayer">
|
<Style Selector="^ /template/ Rectangle#LightDismissLayer">
|
||||||
<Setter Property="Transitions">
|
<Setter Property="Transitions">
|
||||||
|
|||||||
@@ -491,6 +491,7 @@
|
|||||||
<Setter Property="VerticalContentAlignment" Value="Center" />
|
<Setter Property="VerticalContentAlignment" Value="Center" />
|
||||||
<Setter Property="FocusAdorner" Value="{x:Null}" />
|
<Setter Property="FocusAdorner" Value="{x:Null}" />
|
||||||
<Setter Property="ScrollViewer.IsScrollChainingEnabled" Value="True" />
|
<Setter Property="ScrollViewer.IsScrollChainingEnabled" Value="True" />
|
||||||
|
<Setter Property="ContextFlyout" Value="{StaticResource DefaultTextBoxContextFlyout}" />
|
||||||
<Setter Property="Template">
|
<Setter Property="Template">
|
||||||
<ControlTemplate TargetType="TextBox">
|
<ControlTemplate TargetType="TextBox">
|
||||||
<Border Name="PART_ContentPresenterBorder" MinHeight="{TemplateBinding MinHeight}">
|
<Border Name="PART_ContentPresenterBorder" MinHeight="{TemplateBinding MinHeight}">
|
||||||
|
|||||||
@@ -35,11 +35,6 @@ public class SemiTheme : Styles
|
|||||||
|
|
||||||
private CultureInfo? _locale;
|
private CultureInfo? _locale;
|
||||||
|
|
||||||
public SemiTheme(IServiceProvider? provider = null)
|
|
||||||
{
|
|
||||||
AvaloniaXamlLoader.Load(provider, this);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static ThemeVariant Aquatic => new(nameof(Aquatic), ThemeVariant.Dark);
|
public static ThemeVariant Aquatic => new(nameof(Aquatic), ThemeVariant.Dark);
|
||||||
public static ThemeVariant Desert => new(nameof(Desert), ThemeVariant.Light);
|
public static ThemeVariant Desert => new(nameof(Desert), ThemeVariant.Light);
|
||||||
public static ThemeVariant Dusk => new(nameof(Dusk), ThemeVariant.Dark);
|
public static ThemeVariant Dusk => new(nameof(Dusk), ThemeVariant.Dark);
|
||||||
|
|||||||
Reference in New Issue
Block a user