Skip to content

heartacker/VariableBox.Avalonia

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

VariableBox

GitHub stars GitHub release Nuget Nuget Nuget Nuget

drawing

VariableBox is a UI library for building cross-platform UIs with Avalonia UI.

Demo

Feature

NumericalUpDown

  • all numerical type support
  • spinning updown support
  • get (read) /set (write) support
  • rich formatting support like hex, dec and bin
  • drag support, you can use mouse to drag
  • mouse scroll support
  • shortcut and arrow key support
    • Esc for cancel editing
    • Enter for trigger
    • up for increase
    • down for decrease
    • alt+left for read
    • alt+right/alt+enterfor trigger (force) write
  • identify support
    • * for editing
    • red * for error input
    • green * for right input

EnumerationUpDown

  • todo

How to use

VariableBox

Add nuget package:

dotnet add package VariableBox.Avalonia

You can now use Ursa controls in your Avalonia Application.

<Window
    ...
    xmlns:v="VariableBox"
    ...>
    <StackPanel Margin="20">
        <v:VariableBoxUInt Value="{Binding Value}" 
            FormatString="X8"
            HeaderContent="0x"
            ParsingNumberStyle="AllowHexSpecifier"
            Step="2"
            IsEnableEditingIndicator="True"
            />
    </StackPanel>
</Window>

VariableBox.Avalonia.Themes.Semi

To make Ursa controls show up in your application, you need to reference to a theme package designed for VariableBox.

  • VariableBox.Avalonia.Themes.Semi is a theme package for Ursa inspired by Semi Design.

    you need to add package Semi.Avalonia frist

  • also VariableBox.Avalonia.Themes.Semi is compatible with <SimpleTheme/>

  • VariableBox.Avalonia.Themes.Semi is NOT compatible with <FluentTheme/>

You can add it to your project by following steps.

  1. Add nuget package:
dotnet add package Semi.Avalonia
dotnet add package VariableBox.Avalonia.Themes.Semi
  1. Include Styles in application:
<Application...
    xmlns:v-semi="using:VariableBox.Avalonia.Themes.Semi"
    ....>

    <Application.Styles>
        <!-- compatible theme -->

        <!-- 1. SimpleTheme -->
        <SimpleTheme/>

        <!-- 2. Semi, recommand -->
        <StyleInclude Source="avares://Semi.Avalonia/Themes/Index.axaml" />

        <!-- set this theme -->
        <v-semi:SemiTheme Locale="zh-CN"/>
    </Application.Styles>