feat: initialize marquee, add demo.
This commit is contained in:
20
demo/Ursa.Demo/Pages/MarqueeDemo.axaml
Normal file
20
demo/Ursa.Demo/Pages/MarqueeDemo.axaml
Normal file
@@ -0,0 +1,20 @@
|
||||
<UserControl
|
||||
x:Class="Ursa.Demo.Pages.MarqueeDemo"
|
||||
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>
|
||||
<u:EnumSelector Name="direction" EnumType="{x:Type u:Direction}" />
|
||||
<u:Marquee
|
||||
Background="Red"
|
||||
Height="100"
|
||||
Direction="{Binding #direction.Value}" >
|
||||
<TextBlock Text="Hello World" VerticalAlignment="Center"/>
|
||||
</u:Marquee>
|
||||
</StackPanel>
|
||||
</UserControl>
|
||||
13
demo/Ursa.Demo/Pages/MarqueeDemo.axaml.cs
Normal file
13
demo/Ursa.Demo/Pages/MarqueeDemo.axaml.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
using Avalonia;
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Markup.Xaml;
|
||||
|
||||
namespace Ursa.Demo.Pages;
|
||||
|
||||
public partial class MarqueeDemo : UserControl
|
||||
{
|
||||
public MarqueeDemo()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
@@ -54,6 +54,7 @@ public partial class MainViewViewModel : ViewModelBase
|
||||
MenuKeys.MenuKeyIpBox => new IPv4BoxDemoViewModel(),
|
||||
MenuKeys.MenuKeyKeyGestureInput => new KeyGestureInputDemoViewModel(),
|
||||
MenuKeys.MenuKeyLoading => new LoadingDemoViewModel(),
|
||||
MenuKeys.MenuKeyMarquee => new MarqueeDemoViewModel(),
|
||||
MenuKeys.MenuKeyMessageBox => new MessageBoxDemoViewModel(),
|
||||
MenuKeys.MenuKeyMultiComboBox => new MultiComboBoxDemoViewModel(),
|
||||
MenuKeys.MenuKeyNavMenu => new NavMenuDemoViewModel(),
|
||||
|
||||
8
demo/Ursa.Demo/ViewModels/MarqueeDemoViewModel.cs
Normal file
8
demo/Ursa.Demo/ViewModels/MarqueeDemoViewModel.cs
Normal file
@@ -0,0 +1,8 @@
|
||||
using CommunityToolkit.Mvvm.ComponentModel;
|
||||
|
||||
namespace Ursa.Demo.ViewModels;
|
||||
|
||||
public class MarqueeDemoViewModel: ViewModelBase
|
||||
{
|
||||
|
||||
}
|
||||
@@ -35,6 +35,7 @@ public class MenuViewModel : ViewModelBase
|
||||
new() { MenuHeader = "IPv4Box", Key = MenuKeys.MenuKeyIpBox },
|
||||
new() { MenuHeader = "KeyGestureInput", Key = MenuKeys.MenuKeyKeyGestureInput },
|
||||
new() { MenuHeader = "Loading", Key = MenuKeys.MenuKeyLoading },
|
||||
new() { MenuHeader = "Marquee", Key = MenuKeys.MenuKeyMarquee },
|
||||
new() { MenuHeader = "Message Box", Key = MenuKeys.MenuKeyMessageBox },
|
||||
new() { MenuHeader = "MultiComboBox", Key = MenuKeys.MenuKeyMultiComboBox, Status = "Updated" },
|
||||
new() { MenuHeader = "Nav Menu", Key = MenuKeys.MenuKeyNavMenu },
|
||||
@@ -89,6 +90,7 @@ public static class MenuKeys
|
||||
public const string MenuKeyIpBox = "IPv4Box";
|
||||
public const string MenuKeyKeyGestureInput = "KeyGestureInput";
|
||||
public const string MenuKeyLoading = "Loading";
|
||||
public const string MenuKeyMarquee = "Marquee";
|
||||
public const string MenuKeyMessageBox = "MessageBox";
|
||||
public const string MenuKeyMultiComboBox = "MultiComboBox";
|
||||
public const string MenuKeyNavMenu = "NavMenu";
|
||||
|
||||
Reference in New Issue
Block a user