+ Drawer;

This commit is contained in:
zeroone 2024-09-07 16:50:09 +08:00
parent 60e232ff43
commit ebaf9a36d8
8 changed files with 64 additions and 9 deletions

View File

@ -24,6 +24,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Build", "Build", "{5EB2524C
ProjectSection(SolutionItems) = preProject
Directory.Build.props = Directory.Build.props
Directory.Packages.props = Directory.Packages.props
Directory.Build.targets = Directory.Build.targets
build\Common.props = build\Common.props
build\Internal.Using.props = build\Internal.Using.props
build\Nuget.props = build\Nuget.props
@ -31,7 +32,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Build", "Build", "{5EB2524C
build\Output.Local.props = build\Output.Local.props
build\Output.props = build\Output.props
build\Version.props = build\Version.props
build\Directory.Build.targets = build\Directory.Build.targets
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tests", "Tests", "{279BC2C9-A818-4D6C-9274-678649932057}"

View File

@ -1,8 +0,0 @@
<Project>
<!-- https://github.com/dotnet/sdk/issues/22515-->
<ItemGroup>
<None Remove="*.csproj.DotSettings" />
</ItemGroup>
</Project>

View File

@ -0,0 +1,23 @@
<UserControl x:Class="AtomUI.Demo.Desktop.ShowCase.DrawerShowCase"
xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:atom="https://atomui.net"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:showcase="clr-namespace:AtomUI.Demo.Desktop.ShowCase"
mc:Ignorable="d">
<showcase:ShowCasePanel>
<showcase:ShowCaseItem Title="Basic" Description="Basic drawer.">
<atom:DrawerContainer>
<Panel>
<Border Height="300" atom:Watermark.Glyph="{atom:TextGlyph 'AtomUI'}" />
<atom:Drawer Background="Gray">
<atom:Button ButtonType="Primary" Text="Close" VerticalAlignment="Top" />
</atom:Drawer>
</Panel>
</atom:DrawerContainer>
</showcase:ShowCaseItem>
</showcase:ShowCasePanel>
</UserControl>

View File

@ -0,0 +1,11 @@
using Avalonia.Controls;
namespace AtomUI.Demo.Desktop.ShowCase;
public partial class DrawerShowCase : UserControl
{
public DrawerShowCase()
{
InitializeComponent();
}
}

View File

@ -168,6 +168,9 @@
<TabItem Header="Watermark">
<showcases:WatermarkShowCase />
</TabItem>
<TabItem Header="Drawer">
<showcases:DrawerShowCase />
</TabItem>
</TabControl>
</Grid>

View File

@ -1,4 +1,5 @@
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<s:Boolean x:Key="/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=drawer/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=primitives_005Catomlayer/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=watermark/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=watermark_005Cglyphs/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary>

View File

@ -0,0 +1,17 @@
using Avalonia;
using Avalonia.Controls.Primitives;
using Avalonia.Metadata;
namespace AtomUI.Controls;
public class Drawer : TemplatedControl
{
[Content]
public object? Content
{
get => GetValue(ContentProperty);
set => SetValue(ContentProperty, value);
}
public static readonly StyledProperty<object?> ContentProperty = AvaloniaProperty
.Register<Drawer, object?>(nameof(Content));
}

View File

@ -0,0 +1,8 @@
using Avalonia.Controls;
namespace AtomUI.Controls;
public class DrawerContainer : ContentControl
{
protected override Type StyleKeyOverride { get; } = typeof(ContentControl);
}