Merge branch 'main' into Coolkeke/main
This commit is contained in:
@@ -8,126 +8,254 @@
|
||||
d:DesignHeight="450"
|
||||
d:DesignWidth="800"
|
||||
mc:Ignorable="d">
|
||||
<StackPanel
|
||||
Margin="24"
|
||||
HorizontalAlignment="Left"
|
||||
ClipToBounds="False">
|
||||
<StackPanel.Styles>
|
||||
<Style Selector="u|Badge">
|
||||
<Setter Property="Margin" Value="14" />
|
||||
</Style>
|
||||
<Style Selector="Border">
|
||||
<Setter Property="Background" Value="Orange" />
|
||||
</Style>
|
||||
</StackPanel.Styles>
|
||||
<TextBlock Text="Hello" />
|
||||
<u:Badge
|
||||
HorizontalAlignment="Center"
|
||||
BadgeContent="500"
|
||||
OverflowCount="100">
|
||||
<Border Width="100" Height="50" />
|
||||
</u:Badge>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<u:Badge BadgeContent="5" CornerPosition="TopLeft">
|
||||
<Border Width="100" Height="50" />
|
||||
</u:Badge>
|
||||
<u:Badge BadgeContent="5" CornerPosition="TopRight">
|
||||
<Border Width="100" Height="50" />
|
||||
</u:Badge>
|
||||
<u:Badge BadgeContent="5" CornerPosition="BottomLeft">
|
||||
<Border Width="100" Height="50" />
|
||||
</u:Badge>
|
||||
<u:Badge BadgeContent="5" CornerPosition="BottomRight">
|
||||
<Border Width="100" Height="50" />
|
||||
<ScrollViewer HorizontalScrollBarVisibility="Auto">
|
||||
<StackPanel
|
||||
Margin="24"
|
||||
HorizontalAlignment="Left"
|
||||
ClipToBounds="False">
|
||||
|
||||
<StackPanel.Styles>
|
||||
<Style Selector="u|Badge">
|
||||
<Setter Property="Margin" Value="14" />
|
||||
</Style>
|
||||
<Style Selector="u|Badge > Border">
|
||||
<Setter Property="Background" Value="Orange" />
|
||||
<Setter Property="CornerRadius" Value="8" />
|
||||
</Style>
|
||||
</StackPanel.Styles>
|
||||
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<u:Badge
|
||||
HorizontalAlignment="Center"
|
||||
Header="500"
|
||||
OverflowCount="100">
|
||||
<Border Width="100" Height="50" />
|
||||
</u:Badge>
|
||||
<u:Badge Header="SUCCEED!">
|
||||
<Border Width="100" Height="50" />
|
||||
</u:Badge>
|
||||
<u:Badge Header="Hello" />
|
||||
<u:Badge Header="Hello" Dot="True" />
|
||||
</StackPanel>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<u:Badge Header="5" CornerPosition="TopLeft">
|
||||
<Border Width="100" Height="50" />
|
||||
</u:Badge>
|
||||
<u:Badge Header="5" CornerPosition="TopRight">
|
||||
<Border Width="100" Height="50" />
|
||||
</u:Badge>
|
||||
<u:Badge Header="5" CornerPosition="BottomLeft">
|
||||
<Border Width="100" Height="50" />
|
||||
</u:Badge>
|
||||
<u:Badge Header="5" CornerPosition="BottomRight">
|
||||
<Border Width="100" Height="50" />
|
||||
</u:Badge>
|
||||
</StackPanel>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<u:Badge
|
||||
Header="VIP"
|
||||
CornerPosition="TopLeft"
|
||||
Dot="True">
|
||||
<Border Width="100" Height="50" />
|
||||
</u:Badge>
|
||||
<u:Badge
|
||||
Header="VIP"
|
||||
CornerPosition="TopRight"
|
||||
Dot="True">
|
||||
<Border Width="100" Height="50" />
|
||||
</u:Badge>
|
||||
<u:Badge
|
||||
Header="VIP"
|
||||
CornerPosition="BottomLeft"
|
||||
Dot="True">
|
||||
<Border Width="100" Height="50" />
|
||||
</u:Badge>
|
||||
<u:Badge
|
||||
Header="VIP"
|
||||
CornerPosition="BottomRight"
|
||||
Dot="True">
|
||||
<Border Width="100" Height="50" />
|
||||
</u:Badge>
|
||||
</StackPanel>
|
||||
<u:Badge HorizontalAlignment="Stretch" Header="VIP">
|
||||
<Border Height="50" />
|
||||
</u:Badge>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<u:Badge Header="URSA" Classes="Primary">
|
||||
<Border Width="100" Height="50" />
|
||||
</u:Badge>
|
||||
<u:Badge Header="URSA" Classes="Secondary">
|
||||
<Border Width="100" Height="50" />
|
||||
</u:Badge>
|
||||
<u:Badge Header="URSA" Classes="Tertiary">
|
||||
<Border Width="100" Height="50" />
|
||||
</u:Badge>
|
||||
<u:Badge Header="URSA" Classes="Warning">
|
||||
<Border Width="100" Height="50" />
|
||||
</u:Badge>
|
||||
<u:Badge Header="URSA" Classes="Danger">
|
||||
<Border Width="100" Height="50" />
|
||||
</u:Badge>
|
||||
<u:Badge Header="URSA" Classes="Success">
|
||||
<Border Width="100" Height="50" />
|
||||
</u:Badge>
|
||||
</StackPanel>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<u:Badge Header="URSA" Classes="Light Primary">
|
||||
<Border Width="100" Height="50" />
|
||||
</u:Badge>
|
||||
<u:Badge Header="URSA" Classes="Light Secondary">
|
||||
<Border Width="100" Height="50" />
|
||||
</u:Badge>
|
||||
<u:Badge Header="URSA" Classes="Light Tertiary">
|
||||
<Border Width="100" Height="50" />
|
||||
</u:Badge>
|
||||
<u:Badge Header="URSA" Classes="Light Warning">
|
||||
<Border Width="100" Height="50" />
|
||||
</u:Badge>
|
||||
<u:Badge Header="URSA" Classes="Light Danger">
|
||||
<Border Width="100" Height="50" />
|
||||
</u:Badge>
|
||||
<u:Badge Header="URSA" Classes="Light Success">
|
||||
<Border Width="100" Height="50" />
|
||||
</u:Badge>
|
||||
</StackPanel>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<u:Badge Header="URSA" Classes="Inverted Primary">
|
||||
<Border Width="100" Height="50" />
|
||||
</u:Badge>
|
||||
<u:Badge Header="URSA" Classes="Inverted Secondary">
|
||||
<Border Width="100" Height="50" />
|
||||
</u:Badge>
|
||||
<u:Badge Header="URSA" Classes="Inverted Tertiary">
|
||||
<Border Width="100" Height="50" />
|
||||
</u:Badge>
|
||||
<u:Badge Header="URSA" Classes="Inverted Warning">
|
||||
<Border Width="100" Height="50" />
|
||||
</u:Badge>
|
||||
<u:Badge Header="URSA" Classes="Inverted Danger">
|
||||
<Border Width="100" Height="50" />
|
||||
</u:Badge>
|
||||
<u:Badge Header="URSA" Classes="Inverted Success">
|
||||
<Border Width="100" Height="50" />
|
||||
</u:Badge>
|
||||
</StackPanel>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<u:Badge
|
||||
Header="URSA"
|
||||
Classes="Primary"
|
||||
Dot="True">
|
||||
<Border Width="100" Height="50" />
|
||||
</u:Badge>
|
||||
<u:Badge
|
||||
Header="URSA"
|
||||
Classes="Secondary"
|
||||
Dot="True">
|
||||
<Border Width="100" Height="50" />
|
||||
</u:Badge>
|
||||
<u:Badge
|
||||
Header="URSA"
|
||||
Classes="Tertiary"
|
||||
Dot="True">
|
||||
<Border Width="100" Height="50" />
|
||||
</u:Badge>
|
||||
<u:Badge
|
||||
Header="URSA"
|
||||
Classes="Warning"
|
||||
Dot="True">
|
||||
<Border Width="100" Height="50" />
|
||||
</u:Badge>
|
||||
<u:Badge
|
||||
Header="URSA"
|
||||
Classes="Danger"
|
||||
Dot="True">
|
||||
<Border Width="100" Height="50" />
|
||||
</u:Badge>
|
||||
<u:Badge
|
||||
Header="URSA"
|
||||
Classes="Success"
|
||||
Dot="True">
|
||||
<Border Width="100" Height="50" />
|
||||
</u:Badge>
|
||||
</StackPanel>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<u:Badge
|
||||
Header="URSA"
|
||||
Classes="Light Primary"
|
||||
Dot="True">
|
||||
<Border Width="100" Height="50" />
|
||||
</u:Badge>
|
||||
<u:Badge
|
||||
Header="URSA"
|
||||
Classes="Light Secondary"
|
||||
Dot="True">
|
||||
<Border Width="100" Height="50" />
|
||||
</u:Badge>
|
||||
<u:Badge
|
||||
Header="URSA"
|
||||
Classes="Light Tertiary"
|
||||
Dot="True">
|
||||
<Border Width="100" Height="50" />
|
||||
</u:Badge>
|
||||
<u:Badge
|
||||
Header="URSA"
|
||||
Classes="Light Warning"
|
||||
Dot="True">
|
||||
<Border Width="100" Height="50" />
|
||||
</u:Badge>
|
||||
<u:Badge
|
||||
Header="URSA"
|
||||
Classes="Light Danger"
|
||||
Dot="True">
|
||||
<Border Width="100" Height="50" />
|
||||
</u:Badge>
|
||||
<u:Badge
|
||||
Header="URSA"
|
||||
Classes="Light Success"
|
||||
Dot="True">
|
||||
<Border Width="100" Height="50" />
|
||||
</u:Badge>
|
||||
</StackPanel>
|
||||
<Border Background="LightGray" CornerRadius="4">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<u:Badge
|
||||
Header="URSA"
|
||||
Classes="Inverted Primary"
|
||||
Dot="True">
|
||||
<Border Width="100" Height="50" />
|
||||
</u:Badge>
|
||||
<u:Badge
|
||||
Header="URSA"
|
||||
Classes="Inverted Primary"
|
||||
Dot="True">
|
||||
<Border Width="100" Height="50" />
|
||||
</u:Badge>
|
||||
<u:Badge
|
||||
Header="URSA"
|
||||
Classes="Inverted Secondary"
|
||||
Dot="True">
|
||||
<Border Width="100" Height="50" />
|
||||
</u:Badge>
|
||||
<u:Badge
|
||||
Header="URSA"
|
||||
Classes="Inverted Tertiary"
|
||||
Dot="True">
|
||||
<Border Width="100" Height="50" />
|
||||
</u:Badge>
|
||||
<u:Badge
|
||||
Header="URSA"
|
||||
Classes="Inverted Warning"
|
||||
Dot="True">
|
||||
<Border Width="100" Height="50" />
|
||||
</u:Badge>
|
||||
<u:Badge
|
||||
Header="URSA"
|
||||
Classes="Inverted Danger"
|
||||
Dot="True">
|
||||
<Border Width="100" Height="50" />
|
||||
</u:Badge>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
</StackPanel>
|
||||
<u:Badge BadgeContent="SUCCEED!">
|
||||
<Border Width="100" Height="50" />
|
||||
</u:Badge>
|
||||
<u:Badge HorizontalAlignment="Stretch" BadgeContent="VIP">
|
||||
<Border Height="50" />
|
||||
</u:Badge>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<u:Badge
|
||||
BadgeContent="VIP"
|
||||
CornerPosition="TopLeft"
|
||||
Dot="True">
|
||||
<Border Width="100" Height="50" />
|
||||
</u:Badge>
|
||||
<u:Badge
|
||||
BadgeContent="VIP"
|
||||
CornerPosition="TopRight"
|
||||
Dot="True">
|
||||
<Border Width="100" Height="50" />
|
||||
</u:Badge>
|
||||
<u:Badge
|
||||
BadgeContent="VIP"
|
||||
CornerPosition="BottomLeft"
|
||||
Dot="True">
|
||||
<Border Width="100" Height="50" />
|
||||
</u:Badge>
|
||||
<u:Badge
|
||||
BadgeContent="VIP"
|
||||
CornerPosition="BottomRight"
|
||||
Dot="True">
|
||||
<Border Width="100" Height="50" />
|
||||
</u:Badge>
|
||||
</StackPanel>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<u:Badge BadgeContent="URSA" Classes="Primary">
|
||||
<Border Width="100" Height="50" />
|
||||
</u:Badge>
|
||||
<u:Badge BadgeContent="URSA" Classes="Secondary">
|
||||
<Border Width="100" Height="50" />
|
||||
</u:Badge>
|
||||
<u:Badge BadgeContent="URSA" Classes="Tertiary">
|
||||
<Border Width="100" Height="50" />
|
||||
</u:Badge>
|
||||
<u:Badge BadgeContent="URSA" Classes="Warning">
|
||||
<Border Width="100" Height="50" />
|
||||
</u:Badge>
|
||||
<u:Badge BadgeContent="URSA" Classes="Danger">
|
||||
<Border Width="100" Height="50" />
|
||||
</u:Badge>
|
||||
</StackPanel>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<u:Badge
|
||||
BadgeContent="URSA"
|
||||
Classes="Primary"
|
||||
Dot="True">
|
||||
<Border Width="100" Height="50" />
|
||||
</u:Badge>
|
||||
<u:Badge
|
||||
BadgeContent="URSA"
|
||||
Classes="Secondary"
|
||||
Dot="True">
|
||||
<Border Width="100" Height="50" />
|
||||
</u:Badge>
|
||||
<u:Badge
|
||||
BadgeContent="URSA"
|
||||
Classes="Tertiary"
|
||||
Dot="True">
|
||||
<Border Width="100" Height="50" />
|
||||
</u:Badge>
|
||||
<u:Badge
|
||||
BadgeContent="URSA"
|
||||
Classes="Warning"
|
||||
Dot="True">
|
||||
<Border Width="100" Height="50" />
|
||||
</u:Badge>
|
||||
<u:Badge
|
||||
BadgeContent="URSA"
|
||||
Classes="Danger"
|
||||
Dot="True">
|
||||
<Border Width="100" Height="50" />
|
||||
</u:Badge>
|
||||
</StackPanel>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<u:Badge VerticalAlignment="Center" BadgeContent="Hello" />
|
||||
<u:Badge
|
||||
VerticalAlignment="Center"
|
||||
BadgeContent="Hello"
|
||||
Dot="True" />
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</UserControl>
|
||||
</ScrollViewer>
|
||||
</UserControl>
|
||||
@@ -47,6 +47,5 @@
|
||||
</Grid>
|
||||
</Border>
|
||||
</Grid>
|
||||
|
||||
</StackPanel>
|
||||
</UserControl>
|
||||
|
||||
@@ -14,16 +14,17 @@ public partial class BannerDemo : UserControl
|
||||
InitializeComponent();
|
||||
this.DataContext = new BannerDemoViewModel();
|
||||
}
|
||||
|
||||
|
||||
private void InitializeComponent()
|
||||
{
|
||||
AvaloniaXamlLoader.Load(this);
|
||||
}
|
||||
}
|
||||
|
||||
public class BannerDemoViewModel: ViewModelBase
|
||||
public class BannerDemoViewModel : ViewModelBase
|
||||
{
|
||||
private ObservableCollection<NotificationType> _types;
|
||||
|
||||
public ObservableCollection<NotificationType> Types
|
||||
{
|
||||
get => _types;
|
||||
@@ -48,6 +49,9 @@ public class BannerDemoViewModel: ViewModelBase
|
||||
|
||||
public BannerDemoViewModel()
|
||||
{
|
||||
Types = new ObservableCollection<NotificationType>() { NotificationType.Information, NotificationType.Warning, NotificationType.Error, NotificationType.Success };
|
||||
Types = new ObservableCollection<NotificationType>()
|
||||
{
|
||||
NotificationType.Information, NotificationType.Success, NotificationType.Warning, NotificationType.Error
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -13,10 +13,23 @@
|
||||
mc:Ignorable="d">
|
||||
|
||||
<StackPanel Margin="20" Spacing="20">
|
||||
<u:ButtonGroup Classes="Primary Solid" ItemsSource="{Binding Items}" />
|
||||
<u:ButtonGroup Classes="Primary" ItemsSource="{Binding Items}" />
|
||||
<u:ButtonGroup Classes="Primary Borderless" ItemsSource="{Binding Items}" />
|
||||
<u:ButtonGroup Classes="Primary Large" ItemsSource="{Binding Items}" />
|
||||
<u:ButtonGroup Classes="Primary Small" ItemsSource="{Binding Items}" />
|
||||
<u:ButtonGroup Classes="Primary Solid"
|
||||
CommandBinding="{Binding InvokeCommand}"
|
||||
ItemsSource="{Binding Items}" >
|
||||
<u:ButtonGroup.ItemTemplate>
|
||||
<DataTemplate x:DataType="vm:ButtonItem">
|
||||
<TextBlock>
|
||||
<Run Text="🐼"></Run>
|
||||
<Run Text="{Binding Name}"></Run>
|
||||
</TextBlock>
|
||||
</DataTemplate>
|
||||
</u:ButtonGroup.ItemTemplate>
|
||||
</u:ButtonGroup>
|
||||
|
||||
<u:ButtonGroup Classes="Primary"
|
||||
ContentBinding="{Binding Name}"
|
||||
CommandBinding="{Binding InvokeCommand}"
|
||||
ItemsSource="{Binding Items}" >
|
||||
</u:ButtonGroup>
|
||||
</StackPanel>
|
||||
</UserControl>
|
||||
|
||||
16
demo/Ursa.Demo/Pages/ClassInputDemo.axaml
Normal file
16
demo/Ursa.Demo/Pages/ClassInputDemo.axaml
Normal file
@@ -0,0 +1,16 @@
|
||||
<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.ClassInputDemo">
|
||||
<StackPanel HorizontalAlignment="Left" Spacing="20">
|
||||
<u:ControlClassesInput Name="input" Separator=" " />
|
||||
<Button u:ControlClassesInput.Source="{Binding #input}" Content="Hello Panda" />
|
||||
<Button u:ControlClassesInput.Source="{Binding #input}" Content="Hello Panda" />
|
||||
<Button u:ControlClassesInput.Source="{Binding #input}" Content="Hello Panda" />
|
||||
<TextBox u:ControlClassesInput.Source="{Binding #input}" Width="100" Text="100"></TextBox>
|
||||
<ProgressBar u:ControlClassesInput.Source="{Binding #input}" Width="200" Value="20" ShowProgressText="True"></ProgressBar>
|
||||
</StackPanel>
|
||||
</UserControl>
|
||||
13
demo/Ursa.Demo/Pages/ClassInputDemo.axaml.cs
Normal file
13
demo/Ursa.Demo/Pages/ClassInputDemo.axaml.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
using Avalonia;
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Markup.Xaml;
|
||||
|
||||
namespace Ursa.Demo.Pages;
|
||||
|
||||
public partial class ClassInputDemo : UserControl
|
||||
{
|
||||
public ClassInputDemo()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
117
demo/Ursa.Demo/Pages/DialogDemo.axaml
Normal file
117
demo/Ursa.Demo/Pages/DialogDemo.axaml
Normal file
@@ -0,0 +1,117 @@
|
||||
<UserControl
|
||||
x:Class="Ursa.Demo.Pages.DialogDemo"
|
||||
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"
|
||||
xmlns:vm="using:Ursa.Demo.ViewModels"
|
||||
d:DesignHeight="450"
|
||||
d:DesignWidth="800"
|
||||
x:CompileBindings="True"
|
||||
x:DataType="vm:DialogDemoViewModel"
|
||||
mc:Ignorable="d">
|
||||
<Grid ColumnDefinitions="Auto, *">
|
||||
<TabControl Grid.Column="0" Width="300">
|
||||
<TabItem Header="Default">
|
||||
<StackPanel>
|
||||
<ToggleSwitch
|
||||
Name="overlay"
|
||||
Content="Window/Overlay"
|
||||
IsChecked="{Binding IsWindow}"
|
||||
OffContent="Overlay"
|
||||
OnContent="Window" />
|
||||
<ToggleSwitch
|
||||
Content="Global/Local"
|
||||
IsChecked="{Binding IsGlobal}"
|
||||
IsVisible="{Binding !#overlay.IsChecked}"
|
||||
OffContent="Local"
|
||||
OnContent="Global" />
|
||||
<ToggleSwitch
|
||||
Name="defaultModal"
|
||||
Content="Modal/Regular"
|
||||
IsChecked="{Binding IsModal}"
|
||||
IsVisible="{Binding !#overlay.IsChecked}"
|
||||
OffContent="Regular"
|
||||
OnContent="Modal" />
|
||||
<ToggleSwitch
|
||||
Content="ClickOnMaskToClose"
|
||||
IsChecked="{Binding CanLightDismiss}"
|
||||
OffContent="No"
|
||||
OnContent="Yes" />
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBlock Text="Buttons" />
|
||||
<ComboBox ItemsSource="{Binding Buttons}" SelectedItem="{Binding SelectedButton}" />
|
||||
</StackPanel>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBlock Text="Mode" />
|
||||
<ComboBox ItemsSource="{Binding Modes}" SelectedItem="{Binding SelectedMode}" />
|
||||
</StackPanel>
|
||||
<Button Command="{Binding ShowDialogCommand}" Content="Show Dialog" />
|
||||
<TextBlock>
|
||||
<Run Text="Default Result: " />
|
||||
<Run Text="{Binding DefaultResult}" />
|
||||
</TextBlock>
|
||||
<TextBlock>
|
||||
<Run Text="Dialog Date: " />
|
||||
<Run Text="{Binding Date}" />
|
||||
</TextBlock>
|
||||
</StackPanel>
|
||||
</TabItem>
|
||||
<TabItem Header="Custom">
|
||||
<StackPanel>
|
||||
<ToggleSwitch
|
||||
Name="overlay2"
|
||||
Content="Window/Overlay"
|
||||
IsChecked="{Binding IsWindow}"
|
||||
OffContent="Overlay"
|
||||
OnContent="Window" />
|
||||
<ToggleSwitch
|
||||
Content="Global/Local"
|
||||
IsChecked="{Binding IsGlobal}"
|
||||
IsVisible="{Binding !#overlay2.IsChecked}"
|
||||
OffContent="Local"
|
||||
OnContent="Global" />
|
||||
<ToggleSwitch
|
||||
Content="Modal/Regular"
|
||||
Name="modal"
|
||||
IsChecked="{Binding IsModal}"
|
||||
OffContent="Regular"
|
||||
OnContent="Modal" />
|
||||
<ToggleSwitch
|
||||
Content="ClickOnMaskToClose"
|
||||
IsChecked="{Binding CanLightDismiss}"
|
||||
OffContent="No"
|
||||
OnContent="Yes" />
|
||||
<Button Command="{Binding ShowCustomDialogCommand}" Content="Show Dialog" />
|
||||
<TextBlock>
|
||||
<Run Text="Custom Result: " />
|
||||
<Run Text="{Binding Result}" />
|
||||
</TextBlock>
|
||||
<TextBlock>
|
||||
<Run Text="Dialog Date: " />
|
||||
<Run Text="{Binding Date}" />
|
||||
</TextBlock>
|
||||
</StackPanel>
|
||||
</TabItem>
|
||||
</TabControl>
|
||||
<Grid Grid.Column="1">
|
||||
<Border
|
||||
BorderBrush="{DynamicResource SemiGrey1}"
|
||||
BorderThickness="1"
|
||||
ClipToBounds="True"
|
||||
CornerRadius="20">
|
||||
<u:OverlayDialogHost HostId="LocalHost">
|
||||
<u:OverlayDialogHost.DialogDataTemplates>
|
||||
<DataTemplate DataType="x:String">
|
||||
<TextBlock
|
||||
Margin="24,24,48,24"
|
||||
Foreground="Red"
|
||||
Text="{Binding Path=.}" />
|
||||
</DataTemplate>
|
||||
</u:OverlayDialogHost.DialogDataTemplates>
|
||||
</u:OverlayDialogHost>
|
||||
</Border>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
13
demo/Ursa.Demo/Pages/DialogDemo.axaml.cs
Normal file
13
demo/Ursa.Demo/Pages/DialogDemo.axaml.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
using Avalonia;
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Markup.Xaml;
|
||||
|
||||
namespace Ursa.Demo.Pages;
|
||||
|
||||
public partial class DialogDemo : UserControl
|
||||
{
|
||||
public DialogDemo()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
29
demo/Ursa.Demo/Pages/DisableContainerDemo.axaml
Normal file
29
demo/Ursa.Demo/Pages/DisableContainerDemo.axaml
Normal file
@@ -0,0 +1,29 @@
|
||||
<UserControl
|
||||
x:Class="Ursa.Demo.Pages.DisableContainerDemo"
|
||||
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 HorizontalAlignment="Left" Spacing="20">
|
||||
<ToggleSwitch Name="s" IsChecked="True" />
|
||||
<u:DisableContainer DisabledTip="This is disabled. ">
|
||||
<Button IsEnabled="{Binding #s.IsChecked}">Hello World!</Button>
|
||||
</u:DisableContainer>
|
||||
<u:DisableContainer DisabledTip="This is disabled. ">
|
||||
<Calendar IsEnabled="{Binding #s.IsChecked}" />
|
||||
</u:DisableContainer>
|
||||
<u:DisableContainer>
|
||||
<Button IsEnabled="{Binding #s.IsChecked}">Hello Avalonia</Button>
|
||||
</u:DisableContainer>
|
||||
<Button
|
||||
u:DisabledAdorner.DisabledTip="Fine"
|
||||
u:DisabledAdorner.IsEnabled="True"
|
||||
IsEnabled="{Binding #s.IsChecked}">
|
||||
Hello Avalonia
|
||||
</Button>
|
||||
</StackPanel>
|
||||
</UserControl>
|
||||
13
demo/Ursa.Demo/Pages/DisableContainerDemo.axaml.cs
Normal file
13
demo/Ursa.Demo/Pages/DisableContainerDemo.axaml.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
using Avalonia;
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Markup.Xaml;
|
||||
|
||||
namespace Ursa.Demo.Pages;
|
||||
|
||||
public partial class DisableContainerDemo : UserControl
|
||||
{
|
||||
public DisableContainerDemo()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
99
demo/Ursa.Demo/Pages/DrawerDemo.axaml
Normal file
99
demo/Ursa.Demo/Pages/DrawerDemo.axaml
Normal file
@@ -0,0 +1,99 @@
|
||||
<UserControl
|
||||
x:Class="Ursa.Demo.Pages.DrawerDemo"
|
||||
xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:common="clr-namespace:Ursa.Common;assembly=Ursa"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:u="https://irihi.tech/ursa"
|
||||
xmlns:vm="clr-namespace:Ursa.Demo.ViewModels;assembly=Ursa.Demo"
|
||||
d:DesignHeight="450"
|
||||
d:DesignWidth="800"
|
||||
x:CompileBindings="True"
|
||||
x:DataType="vm:DrawerDemoViewModel"
|
||||
mc:Ignorable="d">
|
||||
<Grid ColumnDefinitions="Auto, *">
|
||||
<TabControl Grid.Column="0" Width="300">
|
||||
<TabItem Header="Default">
|
||||
<StackPanel>
|
||||
<u:EnumSelector EnumType="common:Position" Value="{Binding SelectedPosition}" />
|
||||
<ToggleSwitch
|
||||
Content="Global/Local"
|
||||
IsChecked="{Binding IsGlobal}"
|
||||
OffContent="Local"
|
||||
OnContent="Global" />
|
||||
<ToggleSwitch
|
||||
Content="Modal"
|
||||
IsChecked="{Binding IsModal}"
|
||||
OffContent="No"
|
||||
OnContent="Yes" />
|
||||
<ToggleSwitch
|
||||
Content="CanLightDismiss"
|
||||
IsChecked="{Binding CanLightDismiss}"
|
||||
OffContent="No"
|
||||
OnContent="Yes" />
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBlock Text="Buttons" />
|
||||
<u:EnumSelector EnumType="{x:Type u:DialogButton}" Value="{Binding SelectedButton}" />
|
||||
</StackPanel>
|
||||
<Button Command="{Binding ShowDialogCommand}" Content="Show Default Drawer" />
|
||||
<TextBlock>
|
||||
<Run Text="Default Result: " />
|
||||
<Run Text="{Binding DefaultResult}" />
|
||||
</TextBlock>
|
||||
<TextBlock>
|
||||
<Run Text="Dialog Date: " />
|
||||
<Run Text="{Binding Date}" />
|
||||
</TextBlock>
|
||||
</StackPanel>
|
||||
</TabItem>
|
||||
<TabItem Header="Custom">
|
||||
<StackPanel>
|
||||
<u:EnumSelector EnumType="common:Position" Value="{Binding SelectedPosition}" />
|
||||
<ToggleSwitch
|
||||
Content="Global/Local"
|
||||
IsChecked="{Binding IsGlobal}"
|
||||
OffContent="Local"
|
||||
OnContent="Global" />
|
||||
<ToggleSwitch
|
||||
Content="CanLightDismiss"
|
||||
IsChecked="{Binding CanLightDismiss}"
|
||||
OffContent="No"
|
||||
OnContent="Yes" />
|
||||
<ToggleSwitch
|
||||
Content="Modal"
|
||||
IsChecked="{Binding IsModal}"
|
||||
OffContent="No"
|
||||
OnContent="Yes" />
|
||||
<Button Command="{Binding ShowCustomDialogCommand}" Content="Show Custom Drawer" />
|
||||
<TextBlock>
|
||||
<Run Text="Custom Result: " />
|
||||
<Run Text="{Binding Result}" />
|
||||
</TextBlock>
|
||||
<TextBlock>
|
||||
<Run Text="Dialog Date: " />
|
||||
<Run Text="{Binding Date}" />
|
||||
</TextBlock>
|
||||
</StackPanel>
|
||||
</TabItem>
|
||||
</TabControl>
|
||||
<Grid Grid.Column="1" ClipToBounds="True">
|
||||
<Border
|
||||
BorderBrush="{DynamicResource SemiGrey1}"
|
||||
BorderThickness="1"
|
||||
ClipToBounds="True"
|
||||
CornerRadius="20">
|
||||
<u:OverlayDialogHost HostId="LocalHost">
|
||||
<u:OverlayDialogHost.DialogDataTemplates>
|
||||
<DataTemplate DataType="x:String">
|
||||
<TextBlock
|
||||
Margin="24,24,48,24"
|
||||
Foreground="Red"
|
||||
Text="{Binding Path=.}" />
|
||||
</DataTemplate>
|
||||
</u:OverlayDialogHost.DialogDataTemplates>
|
||||
</u:OverlayDialogHost>
|
||||
</Border>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
13
demo/Ursa.Demo/Pages/DrawerDemo.axaml.cs
Normal file
13
demo/Ursa.Demo/Pages/DrawerDemo.axaml.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
using Avalonia;
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Markup.Xaml;
|
||||
|
||||
namespace Ursa.Demo.Pages;
|
||||
|
||||
public partial class DrawerDemo : UserControl
|
||||
{
|
||||
public DrawerDemo()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
30
demo/Ursa.Demo/Pages/EnumSelectorDemo.axaml
Normal file
30
demo/Ursa.Demo/Pages/EnumSelectorDemo.axaml
Normal file
@@ -0,0 +1,30 @@
|
||||
<UserControl
|
||||
x:Class="Ursa.Demo.Pages.EnumSelectorDemo"
|
||||
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"
|
||||
xmlns:vm="clr-namespace:Ursa.Demo.ViewModels;assembly=Ursa.Demo"
|
||||
d:DesignHeight="450"
|
||||
d:DesignWidth="800"
|
||||
x:CompileBindings="True"
|
||||
x:DataType="vm:EnumSelectorDemoViewModel"
|
||||
mc:Ignorable="d">
|
||||
<StackPanel>
|
||||
<ToggleSwitch Name="description" Content="Show Description" />
|
||||
<TextBlock Text="Select Type" />
|
||||
<ComboBox
|
||||
Width="200"
|
||||
DisplayMemberBinding="{Binding Name}"
|
||||
ItemsSource="{Binding Types}"
|
||||
SelectedItem="{Binding SelectedType}" />
|
||||
<TextBlock Text="Select Value" />
|
||||
<u:EnumSelector
|
||||
Width="200"
|
||||
DisplayDescription="{Binding #description.IsChecked}"
|
||||
EnumType="{Binding SelectedType}"
|
||||
Value="{Binding Value}" />
|
||||
<TextBlock Text="{Binding Value}" />
|
||||
</StackPanel>
|
||||
</UserControl>
|
||||
13
demo/Ursa.Demo/Pages/EnumSelectorDemo.axaml.cs
Normal file
13
demo/Ursa.Demo/Pages/EnumSelectorDemo.axaml.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
using Avalonia;
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Markup.Xaml;
|
||||
|
||||
namespace Ursa.Demo.Pages;
|
||||
|
||||
public partial class EnumSelectorDemo : UserControl
|
||||
{
|
||||
public EnumSelectorDemo()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
71
demo/Ursa.Demo/Pages/FormDemo.axaml
Normal file
71
demo/Ursa.Demo/Pages/FormDemo.axaml
Normal file
@@ -0,0 +1,71 @@
|
||||
<UserControl
|
||||
x:Class="Ursa.Demo.Pages.FormDemo"
|
||||
xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:common="clr-namespace:Ursa.Common;assembly=Ursa"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:u="https://irihi.tech/ursa"
|
||||
xmlns:vm="clr-namespace:Ursa.Demo.ViewModels;assembly=Ursa.Demo"
|
||||
d:DesignHeight="450"
|
||||
d:DesignWidth="800"
|
||||
x:CompileBindings="True"
|
||||
x:DataType="vm:FormDemoViewModel"
|
||||
mc:Ignorable="d">
|
||||
<ScrollViewer>
|
||||
<StackPanel>
|
||||
<Grid RowDefinitions="Auto, Auto" ColumnDefinitions="Auto, Auto">
|
||||
<TextBlock Grid.Row="0" Grid.Column="0" Text="Label Position" VerticalAlignment="Center"></TextBlock>
|
||||
<TextBlock Grid.Row="1" Grid.Column="0" Text="Label Alignment" VerticalAlignment="Center"></TextBlock>
|
||||
<u:EnumSelector Grid.Row="0" Grid.Column="1"
|
||||
Name="position"
|
||||
EnumType="common:Position"
|
||||
Value="{x:Static common:Position.Top}" />
|
||||
<u:EnumSelector Grid.Row="1" Grid.Column="1"
|
||||
Name="alignment"
|
||||
EnumType="HorizontalAlignment"
|
||||
Value="{x:Static HorizontalAlignment.Left}" />
|
||||
</Grid>
|
||||
<u:Form
|
||||
DataContext="{Binding Model}"
|
||||
LabelAlignment="{Binding #alignment.Value}"
|
||||
LabelPosition="{Binding #position.Value}"
|
||||
LabelWidth="*">
|
||||
<u:FormGroup Header="Information">
|
||||
<TextBox
|
||||
Width="300"
|
||||
u:FormItem.IsRequired="True"
|
||||
u:FormItem.Label="Name"
|
||||
Text="{Binding Name}" />
|
||||
<TextBox
|
||||
Width="300"
|
||||
u:FormItem.Label="Email"
|
||||
Text="{Binding Email}" />
|
||||
</u:FormGroup>
|
||||
<u:FormItem Label="Please select a Date">
|
||||
<CalendarDatePicker SelectedDate="{Binding Date}" />
|
||||
</u:FormItem>
|
||||
|
||||
<u:FormGroup Header="Education">
|
||||
<TextBox
|
||||
HorizontalAlignment="Stretch"
|
||||
u:FormItem.IsRequired="True"
|
||||
u:FormItem.Label="Name"
|
||||
Text="{Binding Name}" />
|
||||
<TextBox
|
||||
HorizontalAlignment="Stretch"
|
||||
u:FormItem.Label="Email"
|
||||
u:FormItem.IsRequired="True"
|
||||
Text="{Binding Email}" />
|
||||
</u:FormGroup>
|
||||
<u:FormItem Label="Click to Submit">
|
||||
<Button Content="Button With Label" />
|
||||
</u:FormItem>
|
||||
<CheckBox Content="I Agree User Agreement" u:FormItem.NoLabel="True"></CheckBox>
|
||||
<u:FormItem NoLabel="True">
|
||||
<Button HorizontalAlignment="Left" Content="No Label" />
|
||||
</u:FormItem>
|
||||
</u:Form>
|
||||
</StackPanel>
|
||||
</ScrollViewer>
|
||||
</UserControl>
|
||||
13
demo/Ursa.Demo/Pages/FormDemo.axaml.cs
Normal file
13
demo/Ursa.Demo/Pages/FormDemo.axaml.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
using Avalonia;
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Markup.Xaml;
|
||||
|
||||
namespace Ursa.Demo.Pages;
|
||||
|
||||
public partial class FormDemo : UserControl
|
||||
{
|
||||
public FormDemo()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
108
demo/Ursa.Demo/Pages/IconButtonDemo.axaml
Normal file
108
demo/Ursa.Demo/Pages/IconButtonDemo.axaml
Normal file
@@ -0,0 +1,108 @@
|
||||
<UserControl
|
||||
x:Class="Ursa.Demo.Pages.IconButtonDemo"
|
||||
xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:common="clr-namespace:Ursa.Common;assembly=Ursa"
|
||||
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">
|
||||
<UserControl.Resources>
|
||||
<StreamGeometry x:Key="iconGlyph">M12.0101 1C5.92171 1 1 5.92171 1 12.0101C1 16.8771 4.15354 20.9967 8.5284 22.455C9.07526 22.5644 9.27577 22.218 9.27577 21.9264C9.27577 21.6712 9.25754 20.7962 9.25754 19.8848C6.19514 20.541 5.55714 18.5723 5.55714 18.5723C5.06497 17.2963 4.33583 16.9682 4.33583 16.9682C3.33326 16.2938 4.40874 16.2938 4.40874 16.2938C5.52069 16.3667 6.104 17.4239 6.104 17.4239C7.08834 19.101 8.67423 18.627 9.31223 18.3354C9.40337 17.6245 9.69503 17.1323 10.0049 16.8589C7.56229 16.6037 4.99206 15.6558 4.99206 11.4267C4.99206 10.2237 5.42954 9.23931 6.12223 8.47371C6.01286 8.20028 5.63006 7.07011 6.2316 5.55714C6.2316 5.55714 7.16126 5.26548 9.25754 6.68731C10.1325 6.45034 11.0804 6.32274 12.0101 6.32274C12.9397 6.32274 13.8876 6.45034 14.7626 6.68731C16.8589 5.26548 17.7885 5.55714 17.7885 5.55714C18.3901 7.07011 18.0073 8.20028 17.8979 8.47371C18.6088 9.23931 19.0281 10.2237 19.0281 11.4267C19.0281 15.6558 16.4578 16.5854 13.997 16.8589C14.398 17.2052 14.7443 17.8614 14.7443 18.9004C14.7443 20.377 14.7261 21.5618 14.7261 21.9264C14.7261 22.218 14.9266 22.5644 15.4735 22.455C19.8483 20.9967 23.0019 16.8771 23.0019 12.0101C23.0201 5.92171 18.0802 1 12.0101 1Z</StreamGeometry>
|
||||
</UserControl.Resources>
|
||||
<StackPanel HorizontalAlignment="Left" Spacing="16">
|
||||
<ToggleSwitch Name="loading" Content="Toggle Loading" />
|
||||
<u:EnumSelector Name="placement" EnumType="{x:Type common:Position}" />
|
||||
<u:IconButton
|
||||
Content="Hello World"
|
||||
IconPlacement="{Binding #placement.Value}"
|
||||
IsLoading="{Binding #loading.IsChecked}" />
|
||||
<u:IconButton
|
||||
Content="Hello Panda"
|
||||
IconPlacement="{Binding #placement.Value}"
|
||||
IsLoading="{Binding #loading.IsChecked}">
|
||||
<u:IconButton.Icon>
|
||||
<TextBlock
|
||||
HorizontalAlignment="Center"
|
||||
FontSize="40"
|
||||
Text="🐼" />
|
||||
</u:IconButton.Icon>
|
||||
</u:IconButton>
|
||||
<u:IconButton
|
||||
Content="GitHub"
|
||||
IconPlacement="{Binding #placement.Value}"
|
||||
IsLoading="{Binding #loading.IsChecked}">
|
||||
<u:IconButton.Icon>
|
||||
<PathIcon
|
||||
Width="14"
|
||||
Height="14"
|
||||
Data="{StaticResource iconGlyph}" />
|
||||
</u:IconButton.Icon>
|
||||
</u:IconButton>
|
||||
<u:IconButton
|
||||
Width="150"
|
||||
Content="GitHub"
|
||||
IconPlacement="{Binding #placement.Value}"
|
||||
IsLoading="{Binding #loading.IsChecked}">
|
||||
<u:IconButton.Icon>
|
||||
<PathIcon
|
||||
Width="14"
|
||||
Height="14"
|
||||
Data="{StaticResource iconGlyph}" />
|
||||
</u:IconButton.Icon>
|
||||
</u:IconButton>
|
||||
<u:IconButton
|
||||
Width="150"
|
||||
Classes="Warning"
|
||||
Content="GitHub"
|
||||
IconPlacement="{Binding #placement.Value}"
|
||||
IsLoading="{Binding #loading.IsChecked}">
|
||||
<u:IconButton.Icon>
|
||||
<PathIcon
|
||||
Width="14"
|
||||
Height="14"
|
||||
Data="{StaticResource iconGlyph}" />
|
||||
</u:IconButton.Icon>
|
||||
</u:IconButton>
|
||||
<u:IconButton
|
||||
Width="150"
|
||||
Content="GitHub"
|
||||
IconPlacement="{Binding #placement.Value}"
|
||||
IsLoading="{Binding #loading.IsChecked}"
|
||||
Theme="{DynamicResource SolidIconButton}">
|
||||
<u:IconButton.Icon>
|
||||
<PathIcon
|
||||
Width="14"
|
||||
Height="14"
|
||||
Data="{StaticResource iconGlyph}" />
|
||||
</u:IconButton.Icon>
|
||||
</u:IconButton>
|
||||
<u:IconButton
|
||||
Width="150"
|
||||
Classes="Warning"
|
||||
Content="GitHub"
|
||||
IconPlacement="{Binding #placement.Value}"
|
||||
IsLoading="{Binding #loading.IsChecked}"
|
||||
Theme="{DynamicResource SolidIconButton}">
|
||||
<u:IconButton.Icon>
|
||||
<PathIcon
|
||||
Width="14"
|
||||
Height="14"
|
||||
Data="{StaticResource iconGlyph}" />
|
||||
</u:IconButton.Icon>
|
||||
</u:IconButton>
|
||||
<u:IconButton
|
||||
Classes="Danger"
|
||||
IsLoading="{Binding #loading.IsChecked}"
|
||||
Theme="{DynamicResource SolidIconButton}">
|
||||
<u:IconButton.Icon>
|
||||
<TextBlock
|
||||
HorizontalAlignment="Center"
|
||||
FontSize="40"
|
||||
Text="🐼" />
|
||||
</u:IconButton.Icon>
|
||||
</u:IconButton>
|
||||
</StackPanel>
|
||||
</UserControl>
|
||||
13
demo/Ursa.Demo/Pages/IconButtonDemo.axaml.cs
Normal file
13
demo/Ursa.Demo/Pages/IconButtonDemo.axaml.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
using Avalonia;
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Markup.Xaml;
|
||||
|
||||
namespace Ursa.Demo.Pages;
|
||||
|
||||
public partial class IconButtonDemo : UserControl
|
||||
{
|
||||
public IconButtonDemo()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
117
demo/Ursa.Demo/Pages/ImageViewerDemo.axaml
Normal file
117
demo/Ursa.Demo/Pages/ImageViewerDemo.axaml
Normal file
@@ -0,0 +1,117 @@
|
||||
<UserControl
|
||||
x:Class="Ursa.Demo.Pages.ImageViewerDemo"
|
||||
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">
|
||||
<UserControl.Resources>
|
||||
<SolidColorBrush x:Key="MaskBackground" Opacity="0.2" Color="Red" />
|
||||
<SolidColorBrush x:Key="MaskBorder" Color="Red" />
|
||||
</UserControl.Resources>
|
||||
<StackPanel>
|
||||
<u:ImageViewer
|
||||
Name="viewer"
|
||||
Width="600"
|
||||
Height="300"
|
||||
Source="../Assets/WORLD.png">
|
||||
<u:ImageViewer.Overlayer>
|
||||
<Grid
|
||||
HorizontalAlignment="Stretch"
|
||||
ColumnDefinitions="*, Auto, *"
|
||||
IsVisible="{Binding #maskSwitch.IsChecked}">
|
||||
<Border
|
||||
Grid.Column="0"
|
||||
HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Stretch"
|
||||
Background="{StaticResource MaskBackground}"
|
||||
BorderBrush="{StaticResource MaskBorder}"
|
||||
BorderThickness="0,0,1,0"
|
||||
IsHitTestVisible="False" />
|
||||
<Rectangle
|
||||
Grid.Column="1"
|
||||
Width="150"
|
||||
HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Stretch"
|
||||
Fill="Transparent"
|
||||
IsHitTestVisible="False" />
|
||||
<Border
|
||||
Grid.Column="2"
|
||||
HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Stretch"
|
||||
Background="{StaticResource MaskBackground}"
|
||||
BorderBrush="{StaticResource MaskBorder}"
|
||||
BorderThickness="1,0,0,0"
|
||||
IsHitTestVisible="False" />
|
||||
</Grid>
|
||||
</u:ImageViewer.Overlayer>
|
||||
</u:ImageViewer>
|
||||
|
||||
<Grid ColumnDefinitions="Auto, Auto, *" RowDefinitions="Auto, Auto, Auto, Auto">
|
||||
<TextBlock
|
||||
Grid.Row="0"
|
||||
Grid.Column="0"
|
||||
Text="Scale" />
|
||||
<Slider
|
||||
Grid.Row="0"
|
||||
Grid.Column="1"
|
||||
Width="200"
|
||||
Maximum="10"
|
||||
Minimum="0.1"
|
||||
Value="{Binding #viewer.Scale}" />
|
||||
<TextBlock
|
||||
Grid.Row="0"
|
||||
Grid.Column="2"
|
||||
Text="{Binding #viewer.Scale, StringFormat=\{0:0.00000\}}" />
|
||||
|
||||
<TextBlock
|
||||
Grid.Row="1"
|
||||
Grid.Column="0"
|
||||
Text="TranslateX" />
|
||||
<Slider
|
||||
Grid.Row="1"
|
||||
Grid.Column="1"
|
||||
Width="200"
|
||||
IsSnapToTickEnabled="True"
|
||||
Maximum="300"
|
||||
Minimum="-300"
|
||||
TickFrequency="0.1"
|
||||
Value="{Binding #viewer.TranslateX}" />
|
||||
<TextBlock
|
||||
Grid.Row="1"
|
||||
Grid.Column="2"
|
||||
Text="{Binding #viewer.TranslateX, StringFormat=\{0:0.0\}}" />
|
||||
|
||||
<TextBlock
|
||||
Grid.Row="2"
|
||||
Grid.Column="0"
|
||||
Text="TranslateY" />
|
||||
<Slider
|
||||
Grid.Row="2"
|
||||
Grid.Column="1"
|
||||
Width="200"
|
||||
IsSnapToTickEnabled="True"
|
||||
Maximum="300"
|
||||
Minimum="-300"
|
||||
TickFrequency="0.1"
|
||||
Value="{Binding #viewer.TranslateY}" />
|
||||
<TextBlock
|
||||
Grid.Row="2"
|
||||
Grid.Column="2"
|
||||
Text="{Binding #viewer.TranslateY, StringFormat=\{0:0.0\}}" />
|
||||
|
||||
<TextBlock
|
||||
Grid.Row="3"
|
||||
Grid.Column="0"
|
||||
Text="Show Mask" />
|
||||
<ToggleSwitch
|
||||
Name="maskSwitch"
|
||||
Grid.Row="3"
|
||||
Grid.Column="1"
|
||||
Theme="{DynamicResource SimpleToggleSwitch}" />
|
||||
</Grid>
|
||||
</StackPanel>
|
||||
</UserControl>
|
||||
14
demo/Ursa.Demo/Pages/ImageViewerDemo.axaml.cs
Normal file
14
demo/Ursa.Demo/Pages/ImageViewerDemo.axaml.cs
Normal file
@@ -0,0 +1,14 @@
|
||||
using Avalonia;
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Interactivity;
|
||||
using Avalonia.Markup.Xaml;
|
||||
|
||||
namespace Ursa.Demo.Pages;
|
||||
|
||||
public partial class ImageViewerDemo : UserControl
|
||||
{
|
||||
public ImageViewerDemo()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
262
demo/Ursa.Demo/Pages/IntroductionDemo.axaml
Normal file
262
demo/Ursa.Demo/Pages/IntroductionDemo.axaml
Normal file
@@ -0,0 +1,262 @@
|
||||
<UserControl
|
||||
x:Class="Ursa.Demo.Pages.IntroductionDemo"
|
||||
xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:converters="clr-namespace:Ursa.Demo.Converters"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:u="https://irihi.tech/ursa"
|
||||
xmlns:vm="using:Ursa.Demo.ViewModels"
|
||||
d:DesignHeight="800"
|
||||
d:DesignWidth="1600"
|
||||
mc:Ignorable="d">
|
||||
<Design.DataContext>
|
||||
<vm:IntroductionDemoViewModel />
|
||||
</Design.DataContext>
|
||||
<UserControl.Resources>
|
||||
<PathGeometry x:Key="InfoPath">M12 23C18.0751 23 23 18.0751 23 12C23 5.92487 18.0751 1 12 1C5.92487 1 1 5.92487 1 12C1 18.0751 5.92487 23 12 23ZM14 7C14 8.10457 13.1046 9 12 9C10.8954 9 10 8.10457 10 7C10 5.89543 10.8954 5 12 5C13.1046 5 14 5.89543 14 7ZM9 10.75C9 10.3358 9.33579 10 9.75 10H12.5C13.0523 10 13.5 10.4477 13.5 11V16.5H14.25C14.6642 16.5 15 16.8358 15 17.25C15 17.6642 14.6642 18 14.25 18H9.75C9.33579 18 9 17.6642 9 17.25C9 16.8358 9.33579 16.5 9.75 16.5H10.5V11.5H9.75C9.33579 11.5 9 11.1642 9 10.75Z</PathGeometry>
|
||||
<SolidColorBrush x:Key="MaskBackground" Opacity="0.2" Color="{DynamicResource SemiBlue3Color}" />
|
||||
<SolidColorBrush x:Key="MaskBorderBrush" Color="{DynamicResource SemiBlue5Color}" />
|
||||
</UserControl.Resources>
|
||||
<UserControl.Styles>
|
||||
<Style Selector="u|Badge">
|
||||
<Setter Property="Margin" Value="10" />
|
||||
<Style Selector="^ > Border">
|
||||
<Setter Property="Theme" Value="{DynamicResource CardBorder}" />
|
||||
<Setter Property="Width" Value="100" />
|
||||
<Setter Property="Height" Value="60" />
|
||||
</Style>
|
||||
</Style>
|
||||
<Style Selector="u|DualBadge">
|
||||
<Setter Property="Margin" Value="4" />
|
||||
</Style>
|
||||
</UserControl.Styles>
|
||||
|
||||
<ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto">
|
||||
<StackPanel Margin="20">
|
||||
<Grid RowDefinitions="Auto, *" ColumnDefinitions="Auto, Auto, Auto">
|
||||
<u:Banner
|
||||
Grid.Column="0"
|
||||
Grid.ColumnSpan="3"
|
||||
Grid.Row="0"
|
||||
Classes="Bordered"
|
||||
Content="Aesthetic revolution of productivity. "
|
||||
Header="Welcome to IRIHI Technology!"
|
||||
Type="Information" />
|
||||
<StackPanel Grid.Column="1" Grid.Row="1" Spacing="20" Margin="8">
|
||||
<u:ImageViewer
|
||||
Name="viewer"
|
||||
Width="600"
|
||||
Height="300"
|
||||
Scale="0.2"
|
||||
Background="{DynamicResource SemiGrey1Color}"
|
||||
Source="../Assets/IRIHI.png">
|
||||
<u:ImageViewer.Overlayer>
|
||||
<Grid
|
||||
HorizontalAlignment="Stretch"
|
||||
ColumnDefinitions="*, Auto, *"
|
||||
IsVisible="{Binding #maskSwitch.IsChecked}">
|
||||
<Border
|
||||
Grid.Column="0"
|
||||
HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Stretch"
|
||||
Background="{DynamicResource MaskBackground}"
|
||||
BorderBrush="{DynamicResource MaskBorderBrush}"
|
||||
BorderThickness="0,0,1,0"
|
||||
IsHitTestVisible="False" />
|
||||
<Rectangle
|
||||
Grid.Column="1"
|
||||
Width="150"
|
||||
HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Stretch"
|
||||
Fill="Transparent"
|
||||
IsHitTestVisible="False" />
|
||||
<Border
|
||||
Grid.Column="2"
|
||||
HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Stretch"
|
||||
Background="{DynamicResource MaskBackground}"
|
||||
BorderBrush="{DynamicResource MaskBorderBrush}"
|
||||
BorderThickness="1,0,0,0"
|
||||
IsHitTestVisible="False" />
|
||||
</Grid>
|
||||
</u:ImageViewer.Overlayer>
|
||||
</u:ImageViewer>
|
||||
<u:Divider>
|
||||
<ToggleSwitch
|
||||
Name="maskSwitch"
|
||||
IsChecked="True"
|
||||
OnContent="Show Mask"
|
||||
OffContent="Show Mask" />
|
||||
</u:Divider>
|
||||
<Grid ColumnDefinitions="*,Auto,*">
|
||||
<StackPanel Grid.Column="0" Spacing="20">
|
||||
<u:IPv4Box HorizontalAlignment="Stretch" />
|
||||
<u:IPv4Box HorizontalAlignment="Stretch" InputMode="Fast" />
|
||||
<RepeatButton Command="{Binding ChangeAddress}" Content="Random" />
|
||||
<u:IPv4Box HorizontalAlignment="Stretch"
|
||||
ShowLeadingZero="True"
|
||||
IPAddress="{Binding Address}" />
|
||||
<u:IPv4Box HorizontalAlignment="Stretch" IsEnabled="False" />
|
||||
</StackPanel>
|
||||
<u:Timeline Grid.Column="1" HorizontalAlignment="Left" Mode="Alternate">
|
||||
<u:TimelineItem
|
||||
Content="Step 1"
|
||||
Header="ToDo"
|
||||
Type="Default"
|
||||
Time="2023-01-14 09:24:05"/>
|
||||
<u:TimelineItem
|
||||
Content="Step 2"
|
||||
Header="Start"
|
||||
Position="Right"
|
||||
Type="Ongoing"
|
||||
Time="2024-01-04 22:32:58"/>
|
||||
<u:TimelineItem
|
||||
Content="Step 3"
|
||||
Header="In Between"
|
||||
Type="Warning"
|
||||
Time="2024-01-05 00:08:29"/>
|
||||
<u:TimelineItem
|
||||
Content="Step 4"
|
||||
Header="Finished"
|
||||
Position="Right"
|
||||
Type="Success"
|
||||
Time="2024-01-05 00:27:44"/>
|
||||
</u:Timeline>
|
||||
<StackPanel Grid.Column="2" Spacing="20">
|
||||
<u:ButtonGroup Classes="Primary Solid" ItemsSource="{Binding ButtonGroupItems}" />
|
||||
<u:ButtonGroup Classes="Primary" ItemsSource="{Binding ButtonGroupItems}" />
|
||||
<u:ButtonGroup Classes="Primary Borderless" ItemsSource="{Binding ButtonGroupItems}" />
|
||||
<u:ButtonGroup Classes="Primary Large" ItemsSource="{Binding ButtonGroupItems}" />
|
||||
<u:ButtonGroup Classes="Primary Small" ItemsSource="{Binding ButtonGroupItems}" />
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel Grid.Column="2" Grid.Row="1" Spacing="20" Margin="8">
|
||||
<u:Divider HorizontalContentAlignment="Right">Badge</u:Divider>
|
||||
<WrapPanel Orientation="Horizontal">
|
||||
<u:Badge Header="Ursa" CornerPosition="TopRight">
|
||||
<Border Classes="Hover">
|
||||
<TextBlock Text="Pyro"/>
|
||||
</Border>
|
||||
</u:Badge>
|
||||
<u:Badge
|
||||
HorizontalAlignment="Center"
|
||||
CornerPosition="TopRight"
|
||||
Header="500"
|
||||
OverflowCount="99">
|
||||
<Border Classes="Hover">
|
||||
<TextBlock Text="Hydro"/>
|
||||
</Border>
|
||||
</u:Badge>
|
||||
<u:Badge
|
||||
Header="Ursa"
|
||||
CornerPosition="TopRight"
|
||||
Dot="True">
|
||||
<Border Classes="Hover">
|
||||
<TextBlock Text="Ameno"/>
|
||||
</Border>
|
||||
</u:Badge>
|
||||
|
||||
<u:Badge Header="Ursa" />
|
||||
<u:Badge Header="Ursa" Dot="True" />
|
||||
</WrapPanel>
|
||||
<WrapPanel Orientation="Horizontal">
|
||||
<u:Badge Header="Ursa" Classes="Secondary">
|
||||
<Border Classes="Hover">
|
||||
<TextBlock Text="Electro"/>
|
||||
</Border>
|
||||
</u:Badge>
|
||||
<u:Badge Header="Ursa" Classes="Tertiary" CornerPosition="BottomLeft">
|
||||
<Border Classes="Hover">
|
||||
<TextBlock Text="Dendro"/>
|
||||
</Border>
|
||||
</u:Badge>
|
||||
<u:Badge Header="Ursa" Classes="Warning" CornerPosition="BottomRight">
|
||||
<Border Classes="Hover">
|
||||
<TextBlock Text="Cryo"/>
|
||||
</Border>
|
||||
</u:Badge>
|
||||
<u:Badge Header="Ursa" Classes="Danger" CornerPosition="TopRight">
|
||||
<Border Classes="Hover">
|
||||
<TextBlock Text="Geo"/>
|
||||
</Border>
|
||||
</u:Badge>
|
||||
</WrapPanel>
|
||||
|
||||
<u:Divider>DualBadge</u:Divider>
|
||||
<WrapPanel Orientation="Horizontal">
|
||||
<u:DualBadge Header="downloads">
|
||||
<u:DualBadge.Icon>
|
||||
<PathIcon
|
||||
Width="14"
|
||||
Height="14"
|
||||
Data="{StaticResource InfoPath}" />
|
||||
</u:DualBadge.Icon>
|
||||
2.4k
|
||||
</u:DualBadge>
|
||||
<u:DualBadge Classes="FlatSquare" Header="downloads">
|
||||
<u:DualBadge.Icon>
|
||||
<PathIcon
|
||||
Width="14"
|
||||
Height="14"
|
||||
Data="{StaticResource InfoPath}" />
|
||||
</u:DualBadge.Icon>
|
||||
2.4k
|
||||
</u:DualBadge>
|
||||
<u:DualBadge Classes="Plastic" Header="downloads">
|
||||
<u:DualBadge.Icon>
|
||||
<PathIcon
|
||||
Width="12"
|
||||
Height="12"
|
||||
Data="{StaticResource InfoPath}" />
|
||||
</u:DualBadge.Icon>
|
||||
2.4k
|
||||
</u:DualBadge>
|
||||
<u:DualBadge Classes="ForTheBadge" Header="downloads">
|
||||
<u:DualBadge.Icon>
|
||||
<PathIcon
|
||||
Width="12"
|
||||
Height="12"
|
||||
Data="{StaticResource InfoPath}" />
|
||||
</u:DualBadge.Icon>
|
||||
2.4k
|
||||
</u:DualBadge>
|
||||
</WrapPanel>
|
||||
|
||||
<u:Divider HorizontalContentAlignment="Left">
|
||||
<ToggleSwitch
|
||||
Name="s"
|
||||
OffContent="Divider"
|
||||
OnContent="Divider"
|
||||
IsChecked="True" />
|
||||
</u:Divider>
|
||||
<u:LoadingContainer
|
||||
IsLoading="{Binding #s.IsChecked}"
|
||||
HorizontalContentAlignment="Stretch"
|
||||
LoadingMessage="Loading...">
|
||||
<StackPanel Spacing="20">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBlock Text="Windows" />
|
||||
<u:Divider Margin="12,0" Orientation="Vertical" />
|
||||
<TextBlock Text="macOS" />
|
||||
<u:Divider Orientation="Vertical" />
|
||||
<TextBlock Text="Linux" />
|
||||
</StackPanel>
|
||||
<Grid Height="100" Background="{DynamicResource MaskBackground}">
|
||||
<u:Divider HorizontalContentAlignment="Stretch">Stretch</u:Divider>
|
||||
</Grid>
|
||||
</StackPanel>
|
||||
</u:LoadingContainer>
|
||||
<u:TagInput HorizontalAlignment="Left" Width="550" />
|
||||
<u:Pagination
|
||||
PageSizeOptions="10, 20, 50, 100"
|
||||
ShowPageSizeSelector="True"
|
||||
TotalCount="600" />
|
||||
</StackPanel>
|
||||
|
||||
</Grid>
|
||||
</StackPanel>
|
||||
</ScrollViewer>
|
||||
</UserControl>
|
||||
13
demo/Ursa.Demo/Pages/IntroductionDemo.axaml.cs
Normal file
13
demo/Ursa.Demo/Pages/IntroductionDemo.axaml.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
using Avalonia;
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Markup.Xaml;
|
||||
|
||||
namespace Ursa.Demo.Pages;
|
||||
|
||||
public partial class IntroductionDemo : UserControl
|
||||
{
|
||||
public IntroductionDemo()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
@@ -13,8 +13,15 @@
|
||||
mc:Ignorable="d">
|
||||
<StackPanel Margin="20">
|
||||
<TextBlock Text="Accept all keys" />
|
||||
<u:KeyGestureInput HorizontalAlignment="Left" Width="500" />
|
||||
<u:KeyGestureInput HorizontalAlignment="Left" />
|
||||
<TextBlock Text="Accept only A,B and C" />
|
||||
<u:KeyGestureInput HorizontalAlignment="Left" AcceptableKeys="{Binding AcceptableKeys}" Width="500" />
|
||||
<u:KeyGestureInput
|
||||
Width="300"
|
||||
HorizontalAlignment="Left"
|
||||
AcceptableKeys="{Binding AcceptableKeys}"
|
||||
Classes="ClearButton"
|
||||
InnerLeftContent="Attack"
|
||||
InnerRightContent="Default" />
|
||||
<u:KeyGestureInput HorizontalAlignment="Stretch" HorizontalContentAlignment="Left" />
|
||||
</StackPanel>
|
||||
</UserControl>
|
||||
35
demo/Ursa.Demo/Pages/MessageBoxDemo.axaml
Normal file
35
demo/Ursa.Demo/Pages/MessageBoxDemo.axaml
Normal file
@@ -0,0 +1,35 @@
|
||||
<UserControl
|
||||
x:Class="Ursa.Demo.Pages.MessageBoxDemo"
|
||||
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:vm="using:Ursa.Demo.ViewModels"
|
||||
d:DesignHeight="450"
|
||||
d:DesignWidth="800"
|
||||
x:CompileBindings="True"
|
||||
x:DataType="vm:MessageBoxDemoViewModel"
|
||||
mc:Ignorable="d">
|
||||
<UserControl.Styles>
|
||||
<Style Selector="Button">
|
||||
<Setter Property="HorizontalAlignment" Value="Left" />
|
||||
<Setter Property="Margin" Value="8"></Setter>
|
||||
</Style>
|
||||
</UserControl.Styles>
|
||||
<StackPanel HorizontalAlignment="Left">
|
||||
<ComboBox ItemsSource="{Binding Icons}" SelectedItem="{Binding SelectedIcon}" />
|
||||
<ToggleSwitch Content="Try Long Message" IsChecked="{Binding UseLong}"></ToggleSwitch>
|
||||
<ToggleSwitch Content="Show Title" IsChecked="{Binding UseTitle}"></ToggleSwitch>
|
||||
<ToggleSwitch Content="Overlay" IsChecked="{Binding UseOverlay}"></ToggleSwitch>
|
||||
<Button Command="{Binding DefaultMessageBoxCommand}" Content="Default" />
|
||||
<Button Command="{Binding OkCommand}" Content="OK" />
|
||||
<Button Command="{Binding OkCancelCommand}" Content="OKCancel" />
|
||||
<Button Command="{Binding YesNoCommand}" Content="YesNo" />
|
||||
<Button Command="{Binding YesNoCancelCommand}" Content="YesNoCancel" />
|
||||
|
||||
<TextBlock>
|
||||
<Run Text="Last Clicked Result: "></Run>
|
||||
<Run Text="{Binding Result}"></Run>
|
||||
</TextBlock>
|
||||
</StackPanel>
|
||||
</UserControl>
|
||||
15
demo/Ursa.Demo/Pages/MessageBoxDemo.axaml.cs
Normal file
15
demo/Ursa.Demo/Pages/MessageBoxDemo.axaml.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
using Avalonia;
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Markup.Xaml;
|
||||
using Ursa.Demo.ViewModels;
|
||||
|
||||
namespace Ursa.Demo.Pages;
|
||||
|
||||
public partial class MessageBoxDemo : UserControl
|
||||
{
|
||||
public MessageBoxDemo()
|
||||
{
|
||||
InitializeComponent();
|
||||
this.DataContext = new MessageBoxDemoViewModel();
|
||||
}
|
||||
}
|
||||
123
demo/Ursa.Demo/Pages/NavMenuDemo.axaml
Normal file
123
demo/Ursa.Demo/Pages/NavMenuDemo.axaml
Normal file
@@ -0,0 +1,123 @@
|
||||
<UserControl
|
||||
x:Class="Ursa.Demo.Pages.NavMenuDemo"
|
||||
xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:converters="clr-namespace:Ursa.Demo.Converters"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:u="https://irihi.tech/ursa"
|
||||
xmlns:vm="using:Ursa.Demo.ViewModels"
|
||||
d:DesignHeight="450"
|
||||
d:DesignWidth="800"
|
||||
x:CompileBindings="True"
|
||||
x:DataType="vm:NavMenuDemoViewModel"
|
||||
mc:Ignorable="d">
|
||||
<UserControl.Resources>
|
||||
<converters:IconNameToPathConverter x:Key="IconConverter" />
|
||||
</UserControl.Resources>
|
||||
<Grid
|
||||
HorizontalAlignment="Left"
|
||||
ColumnDefinitions="Auto, Auto"
|
||||
RowDefinitions="Auto, Auto, *">
|
||||
<ToggleButton
|
||||
Name="collapse"
|
||||
Grid.Row="0"
|
||||
Grid.Column="0"
|
||||
Grid.ColumnSpan="2">
|
||||
Collapse
|
||||
</ToggleButton>
|
||||
<StackPanel Grid.Row="1" Grid.Column="0">
|
||||
<TextBlock Text="{Binding SelectedMenuItem.Header}" />
|
||||
<Button Command="{Binding RandomCommand}">Random a selection</Button>
|
||||
</StackPanel>
|
||||
<Border
|
||||
Grid.Row="2"
|
||||
Grid.Column="0"
|
||||
Padding="0"
|
||||
HorizontalAlignment="Left"
|
||||
Theme="{DynamicResource CardBorder}">
|
||||
<u:NavMenu
|
||||
Name="menu"
|
||||
HeaderBinding="{Binding Header}"
|
||||
IconBinding="{Binding IconIndex}"
|
||||
IsHorizontalCollapsed="{Binding #collapse.IsChecked, Mode=OneWay}"
|
||||
ItemsSource="{Binding MenuItems}"
|
||||
SelectedItem="{Binding SelectedMenuItem}"
|
||||
SubMenuBinding="{Binding Children}">
|
||||
<u:NavMenu.Styles>
|
||||
<Style x:DataType="vm:MenuItem" Selector="u|NavMenuItem">
|
||||
<Setter Property="IsSeparator" Value="{Binding IsSeparator}" />
|
||||
</Style>
|
||||
</u:NavMenu.Styles>
|
||||
<u:NavMenu.IconTemplate>
|
||||
<DataTemplate DataType="{x:Type x:Int32}">
|
||||
<u:TwoTonePathIcon
|
||||
Width="16"
|
||||
Height="16"
|
||||
ActiveForeground="{DynamicResource SemiBlue5}"
|
||||
ActiveStrokeBrush="{DynamicResource SemiBlue5}"
|
||||
Data="{Binding Converter={StaticResource IconConverter}}"
|
||||
Foreground="{DynamicResource SemiGrey5}"
|
||||
IsActive="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=u:NavMenuItem}, Path=IsHighlighted, Mode=TwoWay}"
|
||||
StrokeBrush="{DynamicResource SemiGrey5}" />
|
||||
</DataTemplate>
|
||||
</u:NavMenu.IconTemplate>
|
||||
<u:NavMenu.Header>
|
||||
<Grid HorizontalAlignment="Center" ColumnDefinitions="Auto, Auto">
|
||||
<Image
|
||||
Width="48"
|
||||
Height="48"
|
||||
Margin="4,12"
|
||||
u:NavMenu.CanToggle="True"
|
||||
RenderOptions.BitmapInterpolationMode="HighQuality"
|
||||
Source="../Assets/Ursa.ico" />
|
||||
<TextBlock
|
||||
Grid.Column="1"
|
||||
VerticalAlignment="Center"
|
||||
Classes="H5"
|
||||
IsVisible="{Binding !#menu.IsHorizontalCollapsed}"
|
||||
Text="Ursa Avalonia"
|
||||
Theme="{DynamicResource TitleTextBlock}" />
|
||||
</Grid>
|
||||
</u:NavMenu.Header>
|
||||
</u:NavMenu>
|
||||
</Border>
|
||||
<TextBlock
|
||||
Grid.Row="1"
|
||||
Grid.Column="1"
|
||||
Text="{ReflectionBinding #menu2.SelectedItem.Header}" />
|
||||
<u:NavMenu
|
||||
Name="menu2"
|
||||
Grid.Row="2"
|
||||
Grid.Column="1"
|
||||
IsHorizontalCollapsed="{Binding #collapse.IsChecked}">
|
||||
<u:NavMenuItem Header="Menu 1">
|
||||
<u:NavMenuItem.Icon>
|
||||
<Rectangle
|
||||
Width="10"
|
||||
Height="10"
|
||||
Fill="Red" />
|
||||
</u:NavMenuItem.Icon>
|
||||
<u:NavMenuItem Header="Sub Menu 1" />
|
||||
<u:NavMenuItem Header="Sub Menu 2" />
|
||||
<u:NavMenuItem Header="Sub Menu 3" />
|
||||
</u:NavMenuItem>
|
||||
<u:NavMenuItem Header="Menu 2">
|
||||
<u:NavMenuItem.Icon>
|
||||
<Rectangle
|
||||
Width="10"
|
||||
Height="10"
|
||||
Fill="Red" />
|
||||
</u:NavMenuItem.Icon>
|
||||
</u:NavMenuItem>
|
||||
<u:NavMenuItem Header="Menu 3">
|
||||
<u:NavMenuItem.Icon>
|
||||
<Rectangle
|
||||
Width="10"
|
||||
Height="10"
|
||||
Fill="Red" />
|
||||
</u:NavMenuItem.Icon>
|
||||
</u:NavMenuItem>
|
||||
</u:NavMenu>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
27
demo/Ursa.Demo/Pages/NavMenuDemo.axaml.cs
Normal file
27
demo/Ursa.Demo/Pages/NavMenuDemo.axaml.cs
Normal file
@@ -0,0 +1,27 @@
|
||||
using Avalonia;
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Controls.Shapes;
|
||||
using Avalonia.Input;
|
||||
using Avalonia.LogicalTree;
|
||||
using Avalonia.Markup.Xaml;
|
||||
using Ursa.Demo.ViewModels;
|
||||
|
||||
namespace Ursa.Demo.Pages;
|
||||
|
||||
public partial class NavMenuDemo : UserControl
|
||||
{
|
||||
public NavMenuDemo()
|
||||
{
|
||||
InitializeComponent();
|
||||
this.DataContext = new NavMenuDemoViewModel();
|
||||
}
|
||||
|
||||
private void InputElement_OnPointerPressed(object? sender, PointerPressedEventArgs e)
|
||||
{
|
||||
if (sender is Rectangle c)
|
||||
{
|
||||
c.ApplyStyling();
|
||||
var ancestors = c.GetLogicalAncestors();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,66 +0,0 @@
|
||||
<UserControl
|
||||
x:Class="Ursa.Demo.Pages.NavigationMenuDemo"
|
||||
xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:converters="clr-namespace:Ursa.Demo.Converters"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:u="https://irihi.tech/ursa"
|
||||
xmlns:vm="clr-namespace:Ursa.Demo.ViewModels"
|
||||
d:DesignHeight="450"
|
||||
d:DesignWidth="800"
|
||||
x:CompileBindings="True"
|
||||
x:DataType="vm:NavigationMenuDemoViewModel"
|
||||
mc:Ignorable="d">
|
||||
<UserControl.Resources>
|
||||
<converters:IconNameConverter x:Key="IconNameConverter">
|
||||
<PathGeometry x:Key="User">M12 16C13.9818 16 15.7453 14.3394 16.7142 11.8589C17.3163 11.6122 17.8892 10.8644 18.1508 9.88823C18.4909 8.61881 18.4234 7.48536 17.4964 7.13266C17.4064 2.7111 15.6617 1 12 1C8.33858 1 6.59387 2.71088 6.50372 7.13179C5.57454 7.48354 5.50668 8.61777 5.84709 9.8882C6.10904 10.8658 6.68318 11.6143 7.28626 11.8599C8.2552 14.3398 10.0186 16 12 16Z M19.6049 22C20.8385 22 21.7171 20.8487 20.867 19.9547C19.1971 18.1985 15.853 17 12 17C8.14699 17 4.80292 18.1985 3.133 19.9547C2.2829 20.8487 3.16148 22 4.39513 22H19.6049Z</PathGeometry>
|
||||
<PathGeometry x:Key="Star">M10.7525 1.90411C11.1451 0.698628 12.8549 0.698631 13.2475 1.90411L15.2395 8.01946H21.6858C22.9565 8.01946 23.4848 9.64143 22.4568 10.3865L17.2417 14.1659L19.2337 20.2813C19.6263 21.4868 18.2431 22.4892 17.2151 21.7442L12 17.9647L6.78489 21.7442C5.75687 22.4892 4.37368 21.4868 4.76635 20.2813L6.75834 14.1659L1.54323 10.3865C0.515206 9.64142 1.04354 8.01946 2.31425 8.01946H8.76048L10.7525 1.90411Z</PathGeometry>
|
||||
<PathGeometry x:Key="Gear">M7.99973 5.07197C7.19713 5.53535 6.20729 5.53113 5.40866 5.06092L5.1637 4.91669C4.55751 4.55978 3.77662 4.65563 3.34264 5.20927C2.69567 6.03462 2.17585 6.94251 1.79166 7.90124C1.53027 8.55354 1.83733 9.27693 2.449 9.62286L2.69407 9.76145C3.50107 10.2178 4.00002 11.0732 4.00002 12.0003C4.00002 12.9271 3.50145 13.7822 2.69492 14.2387L2.44842 14.3783C1.83596 14.725 1.52888 15.4497 1.79213 16.1024C1.98358 16.577 2.21048 17.044 2.47374 17.5C2.73723 17.9564 3.0285 18.3868 3.34416 18.7902C3.77773 19.3443 4.5588 19.4406 5.16498 19.0834L5.40839 18.9399C6.20714 18.4692 7.19739 18.4648 8.0003 18.9284C8.80291 19.3918 9.29417 20.2511 9.28627 21.1778L9.28386 21.4601C9.27787 22.1629 9.75107 22.7906 10.4468 22.8903C11.4692 23.0368 12.5154 23.0404 13.5537 22.8927C14.2499 22.7936 14.7231 22.1653 14.7169 21.462L14.7143 21.1785C14.7061 20.2514 15.1974 19.3916 16.0003 18.928C16.8029 18.4647 17.7927 18.4689 18.5914 18.9391L18.8363 19.0833C19.4425 19.4402 20.2234 19.3444 20.6574 18.7907C21.3044 17.9654 21.8242 17.0575 22.2084 16.0988C22.4698 15.4465 22.1627 14.7231 21.551 14.3772L21.306 14.2386C20.499 13.7822 20 12.9268 20 11.9997C20 11.0729 20.4986 10.2178 21.3051 9.76126L21.5516 9.62174C22.1641 9.27506 22.4712 8.55029 22.2079 7.89761C22.0165 7.42297 21.7896 6.95598 21.5263 6.50001C21.2628 6.04362 20.9715 5.61325 20.6559 5.20982C20.2223 4.65568 19.4412 4.55944 18.8351 4.91665L18.5916 5.06009C17.7929 5.53078 16.8026 5.53519 15.9997 5.07163C15.1971 4.60825 14.7059 3.74891 14.7138 2.82218L14.7162 2.53994C14.7222 1.83708 14.249 1.20945 13.5532 1.10973C12.5308 0.963214 11.4846 0.959581 10.4464 1.10733C9.75011 1.20641 9.27691 1.83473 9.28317 2.53798L9.28569 2.82154C9.29395 3.74862 8.80264 4.60841 7.99973 5.07197ZM14 15.4641C15.9132 14.3595 16.5687 11.9132 15.4641 9.99999C14.3595 8.08682 11.9132 7.43132 10 8.53589C8.08684 9.64046 7.43134 12.0868 8.53591 14C9.64048 15.9132 12.0868 16.5687 14 15.4641Z</PathGeometry>
|
||||
|
||||
</converters:IconNameConverter>
|
||||
</UserControl.Resources>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<Border Padding="4" Theme="{DynamicResource CardBorder}">
|
||||
<u:NavigationMenu
|
||||
Name="menu"
|
||||
HorizontalAlignment="Left"
|
||||
ItemsSource="{Binding MenuItems}"
|
||||
ShowCollapseButton="True">
|
||||
<u:NavigationMenu.Header>
|
||||
<TextBlock
|
||||
Classes="H5"
|
||||
Text="Semi Avalonia"
|
||||
Theme="{DynamicResource TitleTextBlock}" />
|
||||
</u:NavigationMenu.Header>
|
||||
<u:NavigationMenu.Icon>
|
||||
<PathIcon
|
||||
Width="32"
|
||||
Height="32"
|
||||
Data="M10.6201 17.5C6.06377 17.5 2.37012 13.8063 2.37012 9.25C2.37012 4.69365 6.06377 1 10.6201 1V17.5ZM13.3701 6.5C17.9265 6.5 21.6201 10.1936 21.6201 14.75C21.6201 19.3063 17.9265 23 13.3701 23V6.5Z" />
|
||||
</u:NavigationMenu.Icon>
|
||||
<u:NavigationMenu.ItemTemplate>
|
||||
<converters:MenuDataTemplateSelector>
|
||||
<converters:MenuDataTemplateSelector.MenuTemplate>
|
||||
<DataTemplate DataType="vm:MenuItemViewModel">
|
||||
<u:NavigationMenuItem Header="{Binding MenuHeader}" ItemsSource="{Binding Children}">
|
||||
<u:NavigationMenuItem.Icon>
|
||||
<PathIcon
|
||||
Width="16"
|
||||
Height="16"
|
||||
Data="{Binding MenuIconName, Converter={StaticResource IconNameConverter}}" />
|
||||
</u:NavigationMenuItem.Icon>
|
||||
</u:NavigationMenuItem>
|
||||
</DataTemplate>
|
||||
</converters:MenuDataTemplateSelector.MenuTemplate>
|
||||
<converters:MenuDataTemplateSelector.SeparatorTemplate>
|
||||
<DataTemplate DataType="vm:MenuItemViewModel">
|
||||
<u:NavigationMenuSeparator Header="{Binding MenuHeader}" />
|
||||
</DataTemplate>
|
||||
</converters:MenuDataTemplateSelector.SeparatorTemplate>
|
||||
</converters:MenuDataTemplateSelector>
|
||||
</u:NavigationMenu.ItemTemplate>
|
||||
</u:NavigationMenu>
|
||||
</Border>
|
||||
</StackPanel>
|
||||
</UserControl>
|
||||
31
demo/Ursa.Demo/Pages/NumberDisplayerDemo.axaml
Normal file
31
demo/Ursa.Demo/Pages/NumberDisplayerDemo.axaml
Normal file
@@ -0,0 +1,31 @@
|
||||
<UserControl
|
||||
x:Class="Ursa.Demo.Pages.NumberDisplayerDemo"
|
||||
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"
|
||||
xmlns:vm="using:Ursa.Demo.ViewModels"
|
||||
d:DesignHeight="450"
|
||||
d:DesignWidth="800"
|
||||
x:CompileBindings="True"
|
||||
x:DataType="vm:NumberDisplayerDemoViewModel"
|
||||
mc:Ignorable="d">
|
||||
<StackPanel HorizontalAlignment="Left">
|
||||
<Button Command="{Binding IncreaseCommand}">Change</Button>
|
||||
<u:Int32Displayer Value="{Binding Value}" />
|
||||
<u:DoubleDisplayer StringFormat="N2" Value="{Binding DoubleValue}" />
|
||||
<u:DateDisplay
|
||||
FontSize="30"
|
||||
StringFormat="yyyy-MM-dd"
|
||||
Value="{Binding DateValue}" />
|
||||
<TextBlock Text="Selectable: "></TextBlock>
|
||||
<u:Int32Displayer Value="{Binding Value}" IsSelectable="True" />
|
||||
<u:DoubleDisplayer StringFormat="N2" Value="{Binding DoubleValue}" IsSelectable="True" />
|
||||
<u:DateDisplay
|
||||
FontSize="30"
|
||||
StringFormat="yyyy-MM-dd"
|
||||
IsSelectable="True"
|
||||
Value="{Binding DateValue}" />
|
||||
</StackPanel>
|
||||
</UserControl>
|
||||
13
demo/Ursa.Demo/Pages/NumberDisplayerDemo.axaml.cs
Normal file
13
demo/Ursa.Demo/Pages/NumberDisplayerDemo.axaml.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
using Avalonia;
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Markup.Xaml;
|
||||
|
||||
namespace Ursa.Demo.Pages;
|
||||
|
||||
public partial class NumberDisplayerDemo : UserControl
|
||||
{
|
||||
public NumberDisplayerDemo()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
26
demo/Ursa.Demo/Pages/NumericUpDownDemo.axaml
Normal file
26
demo/Ursa.Demo/Pages/NumericUpDownDemo.axaml
Normal file
@@ -0,0 +1,26 @@
|
||||
<UserControl
|
||||
x:Class="Ursa.Demo.Pages.NumericUpDownDemo"
|
||||
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">
|
||||
<UserControl.Styles>
|
||||
<Style Selector=":is(u|NumericUpDown)">
|
||||
<Setter Property="Width" Value="240"></Setter>
|
||||
</Style>
|
||||
</UserControl.Styles>
|
||||
<StackPanel HorizontalAlignment="Left">
|
||||
<u:NumericIntUpDown Name="input" InnerLeftContent="Age" Step="1" Value="2" Watermark="Input Value" Classes="ClearButton" />
|
||||
<TextBlock Text="{Binding #input.Value}" ></TextBlock>
|
||||
<u:NumericDoubleUpDown Name="inputDouble" Step="0.5" Value="3.1" EmptyInputValue="1"></u:NumericDoubleUpDown>
|
||||
<TextBlock Text="{Binding #inputDouble.Value}"></TextBlock>
|
||||
<u:NumericByteUpDown Name="inputByte" Step="1" Value="3" EmptyInputValue="1"></u:NumericByteUpDown>
|
||||
<TextBlock Text="{Binding #inputByte.Value}"></TextBlock>
|
||||
<TextBlock Text="Drag"></TextBlock>
|
||||
<u:NumericIntUpDown Step="1" Value="2" Watermark="Input Value" AllowDrag="True" />
|
||||
</StackPanel>
|
||||
</UserControl>
|
||||
15
demo/Ursa.Demo/Pages/NumericUpDownDemo.axaml.cs
Normal file
15
demo/Ursa.Demo/Pages/NumericUpDownDemo.axaml.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
using Avalonia;
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Markup.Xaml;
|
||||
using Ursa.Demo.ViewModels;
|
||||
|
||||
namespace Ursa.Demo.Pages;
|
||||
|
||||
public partial class NumericUpDownDemo : UserControl
|
||||
{
|
||||
public NumericUpDownDemo()
|
||||
{
|
||||
InitializeComponent();
|
||||
DataContext = new NumericUpDownDemoViewModel();
|
||||
}
|
||||
}
|
||||
52
demo/Ursa.Demo/Pages/RangeSliderDemo.axaml
Normal file
52
demo/Ursa.Demo/Pages/RangeSliderDemo.axaml
Normal file
@@ -0,0 +1,52 @@
|
||||
<UserControl
|
||||
x:Class="Ursa.Demo.Pages.RangeSliderDemo"
|
||||
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"
|
||||
xmlns:vm="using:Ursa.Demo.ViewModels"
|
||||
d:DesignHeight="450"
|
||||
d:DesignWidth="800"
|
||||
x:CompileBindings="True"
|
||||
x:DataType="vm:RangeSliderDemoViewModel"
|
||||
mc:Ignorable="d">
|
||||
<UserControl.Styles>
|
||||
<Style Selector="u|NumericDoubleUpDown">
|
||||
<Setter Property="Width" Value="300" />
|
||||
</Style>
|
||||
</UserControl.Styles>
|
||||
<StackPanel>
|
||||
<u:RangeSlider
|
||||
IsSnapToTick="True"
|
||||
TickFrequency="5"
|
||||
TickPlacement="TopLeft"
|
||||
Minimum="{Binding #range.Minimum, Mode=TwoWay}"
|
||||
Maximum="{Binding #range.Maximum, Mode=TwoWay}"
|
||||
LowerValue="{Binding #range.LowerValue, Mode=TwoWay}"
|
||||
UpperValue="{Binding #range.UpperValue, Mode=TwoWay}"/>
|
||||
<u:NumericDoubleUpDown InnerLeftContent="Minimum" Value="{Binding #range.Minimum, Mode=TwoWay}" />
|
||||
<u:NumericDoubleUpDown InnerLeftContent="Maximum" Value="{Binding #range.Maximum, Mode=TwoWay}" />
|
||||
<u:NumericDoubleUpDown InnerLeftContent="LowerValue" Value="{Binding #range.LowerValue, Mode=TwoWay}" />
|
||||
<u:NumericDoubleUpDown InnerLeftContent="UpperValue" Value="{Binding #range.UpperValue, Mode=TwoWay}" />
|
||||
<ComboBox ItemsSource="{Binding Orientations}" SelectedItem="{Binding Orientation}" />
|
||||
<u:RangeSlider
|
||||
Name="range"
|
||||
Margin="8"
|
||||
HorizontalAlignment="Left"
|
||||
VerticalAlignment="Top"
|
||||
Orientation="{Binding Orientation}"
|
||||
TickFrequency="5">
|
||||
<u:RangeSlider.Styles>
|
||||
<Style Selector="u|RangeSlider:horizontal">
|
||||
<Setter Property="Width" Value="400" />
|
||||
<Setter Property="Height" Value="40" />
|
||||
</Style>
|
||||
<Style Selector="u|RangeSlider:vertical">
|
||||
<Setter Property="Width" Value="40" />
|
||||
<Setter Property="Height" Value="400" />
|
||||
</Style>
|
||||
</u:RangeSlider.Styles>
|
||||
</u:RangeSlider>
|
||||
</StackPanel>
|
||||
</UserControl>
|
||||
@@ -5,11 +5,11 @@ using Ursa.Demo.ViewModels;
|
||||
|
||||
namespace Ursa.Demo.Pages;
|
||||
|
||||
public partial class NavigationMenuDemo : UserControl
|
||||
public partial class RangeSliderDemo : UserControl
|
||||
{
|
||||
public NavigationMenuDemo()
|
||||
public RangeSliderDemo()
|
||||
{
|
||||
InitializeComponent();
|
||||
this.DataContext = new NavigationMenuDemoViewModel();
|
||||
this.DataContext = new RangeSliderDemoViewModel();
|
||||
}
|
||||
}
|
||||
55
demo/Ursa.Demo/Pages/SelectionBoxDemo.axaml
Normal file
55
demo/Ursa.Demo/Pages/SelectionBoxDemo.axaml
Normal file
@@ -0,0 +1,55 @@
|
||||
<UserControl
|
||||
x:Class="Ursa.Demo.Pages.SelectionListDemo"
|
||||
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"
|
||||
xmlns:vm="using:Ursa.Demo.ViewModels"
|
||||
d:DesignHeight="450"
|
||||
d:DesignWidth="800"
|
||||
x:CompileBindings="True"
|
||||
x:DataType="vm:SelectionListDemoViewModel"
|
||||
mc:Ignorable="d">
|
||||
<StackPanel HorizontalAlignment="Left">
|
||||
<u:SelectionList ItemsSource="{Binding Items}" SelectedItem="{Binding SelectedItem}">
|
||||
<u:SelectionList.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<StackPanel Orientation="Horizontal" />
|
||||
</ItemsPanelTemplate>
|
||||
</u:SelectionList.ItemsPanel>
|
||||
</u:SelectionList>
|
||||
<u:SelectionList ItemsSource="{Binding Items}" SelectedItem="{Binding SelectedItem}" />
|
||||
<u:SelectionList ItemsSource="{Binding Items}" SelectedItem="{Binding SelectedItem}">
|
||||
<u:SelectionList.Indicator>
|
||||
<Border Background="Transparent" CornerRadius="4">
|
||||
<Border
|
||||
Width="4"
|
||||
Margin="0,8"
|
||||
HorizontalAlignment="Left"
|
||||
VerticalAlignment="Stretch"
|
||||
Background="{DynamicResource SemiBlue6}"
|
||||
CornerRadius="4" />
|
||||
</Border>
|
||||
</u:SelectionList.Indicator>
|
||||
<u:SelectionList.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Panel Height="40">
|
||||
<TextBlock
|
||||
Classes.Active="{Binding $parent[u:SelectionListItem].IsSelected, Mode=OneWay}"
|
||||
Margin="8,0"
|
||||
VerticalAlignment="Center"
|
||||
Text="{Binding}">
|
||||
<TextBlock.Styles>
|
||||
<Style Selector="TextBlock.Active">
|
||||
<Setter Property="Foreground" Value="{DynamicResource SemiOrange6}" />
|
||||
</Style>
|
||||
</TextBlock.Styles>
|
||||
</TextBlock>
|
||||
</Panel>
|
||||
</DataTemplate>
|
||||
</u:SelectionList.ItemTemplate>
|
||||
</u:SelectionList>
|
||||
<Button Command="{Binding Clear}">Clear</Button>
|
||||
</StackPanel>
|
||||
</UserControl>
|
||||
13
demo/Ursa.Demo/Pages/SelectionBoxDemo.axaml.cs
Normal file
13
demo/Ursa.Demo/Pages/SelectionBoxDemo.axaml.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
using Avalonia;
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Markup.Xaml;
|
||||
|
||||
namespace Ursa.Demo.Pages;
|
||||
|
||||
public partial class SelectionListDemo : UserControl
|
||||
{
|
||||
public SelectionListDemo()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
@@ -5,6 +5,9 @@
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:u="https://irihi.tech/ursa"
|
||||
xmlns:vm="using:Ursa.Demo.ViewModels"
|
||||
x:DataType="vm:TagInputDemoViewModel"
|
||||
x:CompileBindings="True"
|
||||
d:DesignHeight="450"
|
||||
d:DesignWidth="800"
|
||||
mc:Ignorable="d">
|
||||
@@ -12,14 +15,14 @@
|
||||
<u:TagInput
|
||||
Name="labels"
|
||||
Margin="20"
|
||||
AllowDuplicates="False"
|
||||
AllowDuplicates="True"
|
||||
Separator="-"
|
||||
Tags="{Binding Tags}" />
|
||||
<u:TagInput
|
||||
Margin="20"
|
||||
AllowDuplicates="False"
|
||||
Separator="-"
|
||||
Tags="{Binding #labels.Tags}" />
|
||||
<ListBox ItemsSource="{Binding #labels.Tags}" />
|
||||
Tags="{Binding DistinctTags}" />
|
||||
<ListBox ItemsSource="{Binding DistinctTags}" />
|
||||
</StackPanel>
|
||||
</UserControl>
|
||||
|
||||
26
demo/Ursa.Demo/Pages/ThemeTogglerDemo.axaml
Normal file
26
demo/Ursa.Demo/Pages/ThemeTogglerDemo.axaml
Normal file
@@ -0,0 +1,26 @@
|
||||
<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.ThemeTogglerDemo">
|
||||
<Grid ColumnDefinitions="Auto, *">
|
||||
<StackPanel Grid.Column="0">
|
||||
<TextBlock Text="Global"></TextBlock>
|
||||
<u:ThemeToggleButton/>
|
||||
<TextBlock Text="Target To Scope"></TextBlock>
|
||||
<u:ThemeToggleButton TargetScope="{Binding #scope}"></u:ThemeToggleButton>
|
||||
</StackPanel>
|
||||
<ThemeVariantScope Grid.Column="1" Name="scope" RequestedThemeVariant="Dark">
|
||||
<Border Theme="{DynamicResource CardBorder}">
|
||||
<StackPanel>
|
||||
<Button Content="Hello World"></Button>
|
||||
<Calendar></Calendar>
|
||||
<u:ThemeToggleButton></u:ThemeToggleButton>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
</ThemeVariantScope>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
13
demo/Ursa.Demo/Pages/ThemeTogglerDemo.axaml.cs
Normal file
13
demo/Ursa.Demo/Pages/ThemeTogglerDemo.axaml.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
using Avalonia;
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Markup.Xaml;
|
||||
|
||||
namespace Ursa.Demo.Pages;
|
||||
|
||||
public partial class ThemeTogglerDemo : UserControl
|
||||
{
|
||||
public ThemeTogglerDemo()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
@@ -4,55 +4,84 @@
|
||||
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:selectors="clr-namespace:Ursa.Demo.TemplateSelectors"
|
||||
xmlns:u="https://irihi.tech/ursa"
|
||||
xmlns:viewModels="clr-namespace:Ursa.Demo.ViewModels"
|
||||
d:DesignHeight="450"
|
||||
d:DesignWidth="800"
|
||||
x:CompileBindings="False"
|
||||
x:CompileBindings="True"
|
||||
x:DataType="viewModels:TimelineDemoViewModel"
|
||||
mc:Ignorable="d">
|
||||
<UserControl.Resources>
|
||||
<u:TimelineFormatConverter x:Key="FormatConverter" />
|
||||
<ResourceDictionary>
|
||||
<selectors:TimelineIconTemplateSelector x:Key="IconSelector" >
|
||||
<SolidColorBrush x:Key="Default" Color="{DynamicResource SemiGray6Color}"></SolidColorBrush>
|
||||
<SolidColorBrush x:Key="Ongoing" Color="{DynamicResource SemiBlue6Color}"></SolidColorBrush>
|
||||
<SolidColorBrush x:Key="Success" Color="{DynamicResource SemiGreen6Color}"></SolidColorBrush>
|
||||
<SolidColorBrush x:Key="Warning" Color="{DynamicResource SemiOrange6Color}"></SolidColorBrush>
|
||||
<SolidColorBrush x:Key="Error" Color="{DynamicResource SemiRed6Color}"></SolidColorBrush>
|
||||
</selectors:TimelineIconTemplateSelector>
|
||||
</ResourceDictionary>
|
||||
</UserControl.Resources>
|
||||
<StackPanel>
|
||||
<u:Timeline>
|
||||
<u:TimelineItem
|
||||
Content="Start"
|
||||
ItemType="Warning"
|
||||
Time="2022-01-01" />
|
||||
<u:TimelineItem
|
||||
Content="In between"
|
||||
ItemType="Ongoing"
|
||||
Time="2022-01-02" />
|
||||
<u:TimelineItem
|
||||
Content="Finished"
|
||||
ItemType="Error"
|
||||
Time="2022-01-03" />
|
||||
<u:TimelineItem
|
||||
Content="Finished"
|
||||
IconForeground="Yellow"
|
||||
ItemType="Default"
|
||||
Time="2022-01-03" />
|
||||
<WrapPanel>
|
||||
<u:Timeline
|
||||
Mode="Alternate"
|
||||
HorizontalAlignment="Left"
|
||||
ContentMemberBinding="{ReflectionBinding Description}"
|
||||
HeaderMemberBinding="{ReflectionBinding Header}"
|
||||
IconMemberBinding="{ReflectionBinding ItemType}"
|
||||
IconTemplate="{StaticResource IconSelector}"
|
||||
ItemsSource="{Binding Items}"
|
||||
TimeMemberBinding="{ReflectionBinding Time}" >
|
||||
|
||||
</u:Timeline>
|
||||
<u:Timeline HorizontalAlignment="Left" ItemsSource="{Binding Items}">
|
||||
<u:Timeline.ItemTemplate>
|
||||
<DataTemplate x:DataType="viewModels:TimelineItemViewModel">
|
||||
<u:TimelineItem
|
||||
Content="{Binding Content}"
|
||||
ItemType="{Binding ItemType}"
|
||||
Time="{Binding Time}"
|
||||
TimeFormat="{Binding TimeFormat}">
|
||||
<u:TimelineItem.ContentTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock
|
||||
MaxWidth="100"
|
||||
Text="{Binding}"
|
||||
TextWrapping="Wrap" />
|
||||
</DataTemplate>
|
||||
</u:TimelineItem.ContentTemplate>
|
||||
</u:TimelineItem>
|
||||
</DataTemplate>
|
||||
</u:Timeline.ItemTemplate>
|
||||
<u:Timeline
|
||||
Mode="Left"
|
||||
HorizontalAlignment="Left"
|
||||
ContentMemberBinding="{ReflectionBinding Description}"
|
||||
HeaderMemberBinding="{ReflectionBinding Header}"
|
||||
IconMemberBinding="{ReflectionBinding ItemType}"
|
||||
IconTemplate="{StaticResource IconSelector}"
|
||||
ItemsSource="{Binding Items}"
|
||||
TimeMemberBinding="{ReflectionBinding Time}" >
|
||||
</u:Timeline>
|
||||
</StackPanel>
|
||||
<u:Timeline
|
||||
Mode="Right"
|
||||
HorizontalAlignment="Left"
|
||||
ContentMemberBinding="{ReflectionBinding Description}"
|
||||
HeaderMemberBinding="{ReflectionBinding Header}"
|
||||
IconMemberBinding="{ReflectionBinding ItemType}"
|
||||
IconTemplate="{StaticResource IconSelector}"
|
||||
ItemsSource="{Binding Items}"
|
||||
TimeMemberBinding="{ReflectionBinding Time}" >
|
||||
</u:Timeline>
|
||||
<u:Timeline HorizontalAlignment="Left" Mode="Alternate">
|
||||
<u:TimelineItem
|
||||
Content="Step 1"
|
||||
Header="第一步"
|
||||
Position="Left"
|
||||
Type="Default" />
|
||||
<u:TimelineItem
|
||||
Content="Step 2"
|
||||
Header="第二步"
|
||||
Position="Right"
|
||||
Type="Success" />
|
||||
<u:TimelineItem
|
||||
Content="Step 3"
|
||||
Header="第三步"
|
||||
Position="Separate"
|
||||
Type="Warning" />
|
||||
<u:TimelineItem
|
||||
Content="Step 4"
|
||||
Header="第四步"
|
||||
Position="Separate"
|
||||
Type="Ongoing" />
|
||||
<u:TimelineItem
|
||||
Content="Step 5"
|
||||
Header="第五步"
|
||||
Position="Separate"
|
||||
TimeFormat="yyyy-MM-dd"
|
||||
Type="Error" />
|
||||
</u:Timeline>
|
||||
</WrapPanel>
|
||||
</UserControl>
|
||||
|
||||
136
demo/Ursa.Demo/Pages/ToolBarDemo.axaml
Normal file
136
demo/Ursa.Demo/Pages/ToolBarDemo.axaml
Normal file
@@ -0,0 +1,136 @@
|
||||
<UserControl
|
||||
x:Class="Ursa.Demo.Pages.ToolBarDemo"
|
||||
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:template="using:Ursa.Demo.Converters"
|
||||
xmlns:u="https://irihi.tech/ursa"
|
||||
xmlns:vm="using:Ursa.Demo.ViewModels"
|
||||
d:DesignHeight="450"
|
||||
d:DesignWidth="800"
|
||||
x:CompileBindings="True"
|
||||
x:DataType="vm:ToolBarDemoViewModel"
|
||||
mc:Ignorable="d">
|
||||
<UserControl.Resources>
|
||||
<ResourceDictionary>
|
||||
<StreamGeometry x:Key="BoldGlyph">M13.5,15.5H10V12.5H13.5A1.5,1.5 0 0,1 15,14A1.5,1.5 0 0,1 13.5,15.5M10,6.5H13A1.5,1.5 0 0,1 14.5,8A1.5,1.5 0 0,1 13,9.5H10M15.6,10.79C16.57,10.11 17.25,9 17.25,8C17.25,5.74 15.5,4 13.25,4H7V18H14.04C16.14,18 17.75,16.3 17.75,14.21C17.75,12.69 16.89,11.39 15.6,10.79Z</StreamGeometry>
|
||||
<StreamGeometry x:Key="ItalicGlyph">M10,4V7H12.21L8.79,15H6V18H14V15H11.79L15.21,7H18V4H10Z</StreamGeometry>
|
||||
</ResourceDictionary>
|
||||
</UserControl.Resources>
|
||||
<Grid ColumnDefinitions="Auto, Auto, *" RowDefinitions="Auto, Auto, *">
|
||||
<u:EnumSelector Name="Orientation" EnumType="Orientation" />
|
||||
<u:ToolBar
|
||||
DockPanel.Dock="Top"
|
||||
Header="Hello World"
|
||||
Orientation="{Binding #Orientation.Value}">
|
||||
<Button u:ToolBar.OverflowMode="Never" Content="Button 1" />
|
||||
<u:ToolBarSeparator />
|
||||
<Button u:ToolBar.OverflowMode="AsNeeded" Content="Button 2" />
|
||||
<Button u:ToolBar.OverflowMode="AsNeeded" Content="Button 3" />
|
||||
<ToggleButton Content="Toggle" />
|
||||
<u:ToolBar.Styles>
|
||||
<Style Selector="u|ToolBar[Orientation=Vertical]">
|
||||
<Setter Property="Grid.Row" Value="1" />
|
||||
<Setter Property="Grid.Column" Value="1" />
|
||||
<Setter Property="Grid.RowSpan" Value="2" />
|
||||
<Setter Property="Grid.ColumnSpan" Value="1" />
|
||||
</Style>
|
||||
<Style Selector="u|ToolBar[Orientation=Horizontal]">
|
||||
<Setter Property="Grid.Row" Value="1" />
|
||||
<Setter Property="Grid.Column" Value="1" />
|
||||
<Setter Property="Grid.RowSpan" Value="1" />
|
||||
<Setter Property="Grid.ColumnSpan" Value="3" />
|
||||
</Style>
|
||||
</u:ToolBar.Styles>
|
||||
</u:ToolBar>
|
||||
<u:ToolBar
|
||||
DockPanel.Dock="Top"
|
||||
ItemsSource="{Binding Items}"
|
||||
Orientation="{Binding #Orientation.Value}">
|
||||
<u:ToolBar.ItemTemplate>
|
||||
<template:ToolBarItemTemplateSelector />
|
||||
</u:ToolBar.ItemTemplate>
|
||||
<u:ToolBar.Styles>
|
||||
<Style Selector="u|ToolBar[Orientation=Vertical]">
|
||||
<Setter Property="Grid.Row" Value="1" />
|
||||
<Setter Property="Grid.Column" Value="0" />
|
||||
<Setter Property="Grid.RowSpan" Value="2" />
|
||||
<Setter Property="Grid.ColumnSpan" Value="1" />
|
||||
</Style>
|
||||
<Style Selector="u|ToolBar[Orientation=Horizontal]">
|
||||
<Setter Property="Grid.Row" Value="0" />
|
||||
<Setter Property="Grid.Column" Value="1" />
|
||||
<Setter Property="Grid.RowSpan" Value="1" />
|
||||
<Setter Property="Grid.ColumnSpan" Value="3" />
|
||||
</Style>
|
||||
</u:ToolBar.Styles>
|
||||
</u:ToolBar>
|
||||
<Grid
|
||||
Grid.Row="2"
|
||||
Grid.Column="2"
|
||||
RowDefinitions="Auto, *">
|
||||
<u:ToolBar Margin="16">
|
||||
<ToggleButton Name="bold">
|
||||
<PathIcon
|
||||
Width="16"
|
||||
Height="16"
|
||||
Data="{DynamicResource BoldGlyph}" />
|
||||
</ToggleButton>
|
||||
<ToggleButton Name="italic">
|
||||
<PathIcon
|
||||
Width="16"
|
||||
Height="16"
|
||||
Data="{DynamicResource ItalicGlyph}" />
|
||||
</ToggleButton>
|
||||
<u:ToolBarSeparator />
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBlock
|
||||
Margin="8,0"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
Text="Font Size" />
|
||||
<ComboBox
|
||||
Name="size"
|
||||
Width="90"
|
||||
SelectedIndex="0">
|
||||
<x:Double>8</x:Double>
|
||||
<x:Double>16</x:Double>
|
||||
<x:Double>32</x:Double>
|
||||
</ComboBox>
|
||||
</StackPanel>
|
||||
<u:ToolBar.Styles>
|
||||
<Style Selector="u|ToolBar[Orientation=Horizontal]">
|
||||
<Setter Property="Grid.Row" Value="2" />
|
||||
<Setter Property="Grid.Column" Value="1" />
|
||||
<Setter Property="Grid.RowSpan" Value="1" />
|
||||
<Setter Property="Grid.ColumnSpan" Value="3" />
|
||||
</Style>
|
||||
</u:ToolBar.Styles>
|
||||
|
||||
</u:ToolBar>
|
||||
<TextBlock
|
||||
Grid.Row="1"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
Classes.Bold="{Binding #bold.IsChecked}"
|
||||
Classes.Italic="{Binding #italic.IsChecked}"
|
||||
FontSize="{Binding #size.SelectedItem}"
|
||||
Text="Hello Ursa Avalonia">
|
||||
<TextBlock.Styles>
|
||||
<Style Selector="TextBlock">
|
||||
<Setter Property="FontWeight" Value="Regular" />
|
||||
<Setter Property="FontSize" Value="8" />
|
||||
<Setter Property="FontStyle" Value="Normal" />
|
||||
</Style>
|
||||
<Style Selector="TextBlock.Bold">
|
||||
<Setter Property="FontWeight" Value="Bold" />
|
||||
</Style>
|
||||
<Style Selector="TextBlock.Italic">
|
||||
<Setter Property="FontStyle" Value="Italic" />
|
||||
</Style>
|
||||
</TextBlock.Styles>
|
||||
</TextBlock>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
13
demo/Ursa.Demo/Pages/ToolBarDemo.axaml.cs
Normal file
13
demo/Ursa.Demo/Pages/ToolBarDemo.axaml.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
using Avalonia;
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Markup.Xaml;
|
||||
|
||||
namespace Ursa.Demo.Pages;
|
||||
|
||||
public partial class ToolBarDemo : UserControl
|
||||
{
|
||||
public ToolBarDemo()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
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();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user