feat: add loading.
This commit is contained in:
25
demo/Ursa.Demo/Pages/LoadingDemo.axaml
Normal file
25
demo/Ursa.Demo/Pages/LoadingDemo.axaml
Normal file
@@ -0,0 +1,25 @@
|
||||
<UserControl
|
||||
x:Class="Ursa.Demo.Pages.LoadingDemo"
|
||||
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">
|
||||
<Grid RowDefinitions="Auto, Auto, *">
|
||||
<ToggleSwitch Name="s" Content="Loading" />
|
||||
<u:LoadingIcon Grid.Row="1" />
|
||||
<Panel
|
||||
Grid.Row="2"
|
||||
HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Stretch">
|
||||
<u:Banner
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
Content="Hello Ursa!" />
|
||||
<u:Loading Content="Loading..." IsLoading="{Binding #s.IsChecked}" />
|
||||
</Panel>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
18
demo/Ursa.Demo/Pages/LoadingDemo.axaml.cs
Normal file
18
demo/Ursa.Demo/Pages/LoadingDemo.axaml.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
using Avalonia;
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Markup.Xaml;
|
||||
|
||||
namespace Ursa.Demo.Pages;
|
||||
|
||||
public partial class LoadingDemo : UserControl
|
||||
{
|
||||
public LoadingDemo()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void InitializeComponent()
|
||||
{
|
||||
AvaloniaXamlLoader.Load(this);
|
||||
}
|
||||
}
|
||||
@@ -35,6 +35,9 @@
|
||||
<TabItem Header="IPv4Box">
|
||||
<pages:IPv4BoxDemo />
|
||||
</TabItem>
|
||||
<TabItem Header="Loading">
|
||||
<pages:LoadingDemo />
|
||||
</TabItem>
|
||||
<TabItem Header="Navigation">
|
||||
<pages:NavigationMenuDemo />
|
||||
</TabItem>
|
||||
|
||||
Reference in New Issue
Block a user