mirror of
https://gitcode.com/gh_mirrors/se/Semi.Avalonia
synced 2026-04-12 20:26:35 +08:00
feat: add button related resources.
This commit is contained in:
@@ -2,13 +2,6 @@
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
x:Class="Semi.Avalonia.Demo.App">
|
||||
<Application.Styles>
|
||||
|
||||
<StyleInclude Source="avares://Semi.Avalonia/Themes/LightTheme.axaml"></StyleInclude>
|
||||
</Application.Styles>
|
||||
<Application.Resources>
|
||||
<ResourceDictionary>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceInclude Source="avares://Semi.Avalonia/Themes/DarkTheme.axaml"/>
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
</ResourceDictionary>
|
||||
</Application.Resources>
|
||||
</Application>
|
||||
|
||||
@@ -2,11 +2,9 @@
|
||||
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="using:Semi.Avalonia.Demo.Pages"
|
||||
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
||||
x:Class="Semi.Avalonia.Demo.MainWindow"
|
||||
Title="Semi.Demo">
|
||||
<StackPanel>
|
||||
<Button>Primary</Button>
|
||||
<Button>Secondary</Button>
|
||||
</StackPanel>
|
||||
<pages:ButtonDemo></pages:ButtonDemo>
|
||||
</Window>
|
||||
|
||||
14
src/Semi.Avalonia.Demo/Pages/ButtonDemo.axaml
Normal file
14
src/Semi.Avalonia.Demo/Pages/ButtonDemo.axaml
Normal file
@@ -0,0 +1,14 @@
|
||||
<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"
|
||||
mc:Ignorable="d" d:DesignWidth="800"
|
||||
d:DesignHeight="450"
|
||||
x:Class="Semi.Avalonia.Demo.Pages.ButtonDemo">
|
||||
<StackPanel Spacing="20" Margin="20" HorizontalAlignment="Left">
|
||||
<Button>Primary</Button>
|
||||
<Button Classes="Large">Primary</Button>
|
||||
<Button Classes="Small">Primary</Button>
|
||||
<Button Classes="Primary">Secondary</Button>
|
||||
</StackPanel>
|
||||
</UserControl>
|
||||
18
src/Semi.Avalonia.Demo/Pages/ButtonDemo.axaml.cs
Normal file
18
src/Semi.Avalonia.Demo/Pages/ButtonDemo.axaml.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
using Avalonia;
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Markup.Xaml;
|
||||
|
||||
namespace Semi.Avalonia.Demo.Pages;
|
||||
|
||||
public partial class ButtonDemo : UserControl
|
||||
{
|
||||
public ButtonDemo()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void InitializeComponent()
|
||||
{
|
||||
AvaloniaXamlLoader.Load(this);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user