VariableBox is a UI library for building cross-platform UIs with Avalonia UI.
- all numerical type support
- spinning updown support
- get (read) /set (write) support
- rich formatting support like
hex
,dec
andbin
- 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
- todo
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>
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.
- Add nuget package:
dotnet add package Semi.Avalonia
dotnet add package VariableBox.Avalonia.Themes.Semi
- 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>