feat: Add resource.
This commit is contained in:
35
demo/Ursa.Demo/Pages/BannerDemo.axaml
Normal file
35
demo/Ursa.Demo/Pages/BannerDemo.axaml
Normal file
@@ -0,0 +1,35 @@
|
||||
<UserControl
|
||||
x:Class="Ursa.Demo.Pages.BannerDemo"
|
||||
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 Spacing="20">
|
||||
<!-- -->
|
||||
<u:Banner
|
||||
Margin="8"
|
||||
Classes="Bordered"
|
||||
Content="Content"
|
||||
Header="Header" />
|
||||
<u:Banner
|
||||
Margin="8"
|
||||
Classes="Bordered"
|
||||
Content="C" />
|
||||
<u:Banner
|
||||
Margin="8"
|
||||
HorizontalContentAlignment="Left"
|
||||
Classes="Bordered"
|
||||
Content="Content"
|
||||
Header="Header" />
|
||||
<u:Banner
|
||||
Margin="8"
|
||||
HorizontalContentAlignment="Left"
|
||||
Classes="Bordered"
|
||||
Content="C" />
|
||||
<u:Banner Margin="8" Content="Content" />
|
||||
</StackPanel>
|
||||
</UserControl>
|
||||
18
demo/Ursa.Demo/Pages/BannerDemo.axaml.cs
Normal file
18
demo/Ursa.Demo/Pages/BannerDemo.axaml.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
using Avalonia;
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Markup.Xaml;
|
||||
|
||||
namespace Ursa.Demo.Pages;
|
||||
|
||||
public partial class BannerDemo : UserControl
|
||||
{
|
||||
public BannerDemo()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void InitializeComponent()
|
||||
{
|
||||
AvaloniaXamlLoader.Load(this);
|
||||
}
|
||||
}
|
||||
@@ -23,7 +23,6 @@
|
||||
<!--Condition below is needed to remove Avalonia.Diagnostics package from build output in Release configuration.-->
|
||||
<PackageReference Condition="'$(Configuration)' == 'Debug'" Include="Avalonia.Diagnostics" Version="11.0.0-preview5" />
|
||||
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.1.0" />
|
||||
<PackageReference Include="Semi.Avalonia" Version="0.1.0-preview5" />
|
||||
<PackageReference Include="XamlNameReferenceGenerator" Version="1.5.1" />
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
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:pages="clr-namespace:Ursa.Demo.Pages"
|
||||
xmlns:vm="using:Ursa.Demo.ViewModels"
|
||||
Title="Ursa.Demo"
|
||||
d:DesignHeight="450"
|
||||
@@ -15,12 +16,10 @@
|
||||
<vm:MainWindowViewModel />
|
||||
</Design.DataContext>
|
||||
|
||||
<StackPanel HorizontalAlignment="Left" Spacing="20">
|
||||
<TextBlock
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
Text="{Binding Greeting}" />
|
||||
<Button Content="Hello World" />
|
||||
</StackPanel>
|
||||
<TabControl TabStripPlacement="Left">
|
||||
<TabItem Header="Banner">
|
||||
<pages:BannerDemo />
|
||||
</TabItem>
|
||||
</TabControl>
|
||||
|
||||
</Window>
|
||||
|
||||
Reference in New Issue
Block a user