feat: add two tone icon.
This commit is contained in:
@@ -21,5 +21,6 @@ public static class MenuKeys
|
||||
public const string MenuKeyRangeSlider = "RangeSlider";
|
||||
public const string MenuKeyTagInput = "TagInput";
|
||||
public const string MenuKeyTimeline = "Timeline";
|
||||
public const string MenuKeyTwoTonePathIcon = "TwoTonePathIcon";
|
||||
|
||||
}
|
||||
18
demo/Ursa.Demo/Pages/TwoTonePathIconDemo.axaml
Normal file
18
demo/Ursa.Demo/Pages/TwoTonePathIconDemo.axaml
Normal file
@@ -0,0 +1,18 @@
|
||||
<UserControl 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"
|
||||
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
||||
x:Class="Ursa.Demo.Pages.TwoTonePathIconDemo">
|
||||
<StackPanel>
|
||||
<TextBlock Text="Size"></TextBlock>
|
||||
<Slider Name="width" Minimum="0" Maximum="100" Value="20" Width="300"></Slider>
|
||||
<ToggleSwitch Name="active" Content="Active"></ToggleSwitch>
|
||||
<u:TwoTonePathIcon
|
||||
IsActive="{Binding ElementName=active, Path=IsChecked}"
|
||||
Width="{Binding #width.Value}"
|
||||
Height="{Binding #width.Value}"
|
||||
Data="M12 3L2 12H5V20H19V12H22L12 3M13 18H11V16H13V18M13 14H11V8H13V14Z"/>
|
||||
</StackPanel>
|
||||
</UserControl>
|
||||
13
demo/Ursa.Demo/Pages/TwoTonePathIconDemo.axaml.cs
Normal file
13
demo/Ursa.Demo/Pages/TwoTonePathIconDemo.axaml.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
using Avalonia;
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Markup.Xaml;
|
||||
|
||||
namespace Ursa.Demo.Pages;
|
||||
|
||||
public partial class TwoTonePathIconDemo : UserControl
|
||||
{
|
||||
public TwoTonePathIconDemo()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
@@ -43,6 +43,7 @@ public class MainViewViewModel : ViewModelBase
|
||||
MenuKeys.MenuKeyRangeSlider => new RangeSliderDemoViewModel(),
|
||||
MenuKeys.MenuKeyTagInput => new TagInputDemoViewModel(),
|
||||
MenuKeys.MenuKeyTimeline => new TimelineDemoViewModel(),
|
||||
MenuKeys.MenuKeyTwoTonePathIcon => new TwoTonePathIconDemoViewModel(),
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -30,6 +30,7 @@ public class MenuViewModel: ViewModelBase
|
||||
new() { MenuHeader = "RangeSlider", Key = MenuKeys.MenuKeyRangeSlider, Status = "New"},
|
||||
new() { MenuHeader = "TagInput", Key = MenuKeys.MenuKeyTagInput },
|
||||
new() { MenuHeader = "Timeline", Key = MenuKeys.MenuKeyTimeline, Status = "Updated" },
|
||||
new() { MenuHeader = "TwoTonePathIcon", Key = MenuKeys.MenuKeyTwoTonePathIcon, Status = "New"},
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
using CommunityToolkit.Mvvm.ComponentModel;
|
||||
|
||||
namespace Ursa.Demo.ViewModels;
|
||||
|
||||
public class TwoTonePathIconDemoViewModel:ObservableObject
|
||||
{
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user