feat: initial DualBadge.
This commit is contained in:
@@ -6,6 +6,7 @@ public static class MenuKeys
|
||||
public const string MenuKeyBanner = "Banner";
|
||||
public const string MenuKeyButtonGroup = "ButtonGroup";
|
||||
public const string MenuKeyDivider = "Divider";
|
||||
public const string MenuKeyDualBadge = "DualBadge";
|
||||
public const string MenuKeyIpBox = "IPv4Box";
|
||||
public const string MenuKeyLoading = "Loading";
|
||||
public const string MenuKeyNavigation = "Navigation";
|
||||
|
||||
23
demo/Ursa.Demo/Pages/DualBadgeDemo.axaml
Normal file
23
demo/Ursa.Demo/Pages/DualBadgeDemo.axaml
Normal file
@@ -0,0 +1,23 @@
|
||||
<UserControl
|
||||
x:Class="Ursa.Demo.Pages.DualBadgeDemo"
|
||||
xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:u="https://irihi.tech/ursa"
|
||||
d:DesignHeight="450"
|
||||
d:DesignWidth="800"
|
||||
mc:Ignorable="d">
|
||||
<StackPanel HorizontalAlignment="Left">
|
||||
<u:DualBadge
|
||||
Header="build">
|
||||
<u:DualBadge.Icon>
|
||||
<PathIcon
|
||||
Width="16"
|
||||
Height="16"
|
||||
Data="M12 23C18.0751 23 23 18.0751 23 12C23 5.92487 18.0751 1 12 1C5.92487 1 1 5.92487 1 12C1 18.0751 5.92487 23 12 23ZM14 7C14 8.10457 13.1046 9 12 9C10.8954 9 10 8.10457 10 7C10 5.89543 10.8954 5 12 5C13.1046 5 14 5.89543 14 7ZM9 10.75C9 10.3358 9.33579 10 9.75 10H12.5C13.0523 10 13.5 10.4477 13.5 11V16.5H14.25C14.6642 16.5 15 16.8358 15 17.25C15 17.6642 14.6642 18 14.25 18H9.75C9.33579 18 9 17.6642 9 17.25C9 16.8358 9.33579 16.5 9.75 16.5H10.5V11.5H9.75C9.33579 11.5 9 11.1642 9 10.75Z"/>
|
||||
</u:DualBadge.Icon>
|
||||
passing
|
||||
</u:DualBadge>
|
||||
</StackPanel>
|
||||
</UserControl>
|
||||
11
demo/Ursa.Demo/Pages/DualBadgeDemo.axaml.cs
Normal file
11
demo/Ursa.Demo/Pages/DualBadgeDemo.axaml.cs
Normal file
@@ -0,0 +1,11 @@
|
||||
using Avalonia.Controls;
|
||||
|
||||
namespace Ursa.Demo.Pages;
|
||||
|
||||
public partial class DualBadgeDemo : UserControl
|
||||
{
|
||||
public DualBadgeDemo()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
5
demo/Ursa.Demo/ViewModels/DualBadgeDemoViewModel.cs
Normal file
5
demo/Ursa.Demo/ViewModels/DualBadgeDemoViewModel.cs
Normal file
@@ -0,0 +1,5 @@
|
||||
namespace Ursa.Demo.ViewModels;
|
||||
|
||||
public class DualBadgeDemoViewModel : ViewModelBase
|
||||
{
|
||||
}
|
||||
@@ -28,6 +28,7 @@ public class MainViewViewModel : ViewModelBase
|
||||
MenuKeys.MenuKeyBanner => new BannerDemoViewModel(),
|
||||
MenuKeys.MenuKeyButtonGroup => new ButtonGroupDemoViewModel(),
|
||||
MenuKeys.MenuKeyDivider => new DividerDemoViewModel(),
|
||||
MenuKeys.MenuKeyDualBadge => new DualBadgeDemoViewModel(),
|
||||
MenuKeys.MenuKeyIpBox => new IPv4BoxDemoViewModel(),
|
||||
MenuKeys.MenuKeyLoading => new LoadingDemoViewModel(),
|
||||
MenuKeys.MenuKeyNavigation => new NavigationMenuDemoViewModel(),
|
||||
|
||||
@@ -15,6 +15,7 @@ public class MenuViewModel: ViewModelBase
|
||||
new() { MenuHeader = "Banner", Key = MenuKeys.MenuKeyBanner },
|
||||
new() { MenuHeader = "ButtonGroup", Key = MenuKeys.MenuKeyButtonGroup },
|
||||
new() { MenuHeader = "Divider", Key = MenuKeys.MenuKeyDivider },
|
||||
new() { MenuHeader = "DualBadge", Key = MenuKeys.MenuKeyDualBadge },
|
||||
new() { MenuHeader = "IPv4Box", Key = MenuKeys.MenuKeyIpBox },
|
||||
new() { MenuHeader = "Loading", Key = MenuKeys.MenuKeyLoading },
|
||||
new() { MenuHeader = "Navigation", Key = MenuKeys.MenuKeyNavigation },
|
||||
|
||||
Reference in New Issue
Block a user