QuickMarkup.WinUI
0.1.6
See the version list below for details.
dotnet add package QuickMarkup.WinUI --version 0.1.6
NuGet\Install-Package QuickMarkup.WinUI -Version 0.1.6
<PackageReference Include="QuickMarkup.WinUI" Version="0.1.6" />
<PackageVersion Include="QuickMarkup.WinUI" Version="0.1.6" />
<PackageReference Include="QuickMarkup.WinUI" />
paket add QuickMarkup.WinUI --version 0.1.6
#r "nuget: QuickMarkup.WinUI, 0.1.6"
#:package QuickMarkup.WinUI@0.1.6
#addin nuget:?package=QuickMarkup.WinUI&version=0.1.6
#tool nuget:?package=QuickMarkup.WinUI&version=0.1.6
QuickMarkup (ALPHA)
This project is still in Alpha. Not recommended for production use yet.
QuickMarkup is a declarative markup language that makes it easier to declare UI in C# without using XAML. Our system relies on reactivity, rather than MVVM style. Some patterns are Vue-inspired.
Currently, our full support is UWP and WinUI 3 .NET 10. Supports most other UI frameworks in C# but with some functionality becoming limited (bind two way, bind to source, and children/child node auto detection do not have full support against native components)
Introduction
QuickMarkup is divided into 3 main sections: Usings, setup, and UI.
int Counter = 0;
<root>
<StackPanel>
<Button Text="Click Me" @Click+=`Counter++` />
<TextBlock
Text=`$"You clicked {Counter} time(s)"`
Visibility=`Counter > 0 ? Visibility.Visible : Visbility.Collapsed`
/>
</StackPanel>
</root>
Usings and setup part are optional. Root declares the place where your UI goes.
- Usings - declare all the imported namespace for variables and class you will use in
<setup>and<root> - Setup - the code that will be run before UI creation. The UI will have access to all those variables you declared in
<setup>tag - UI (
<root>) - the part where your markup goes.
Usage
Real usage will be put as an attribute on C# partial class
[QuickMarkup("""
int Counter = 0;
<root>
<StackPanel>
<Button Text="Click Me" @Click+=`Counter++` />
<TextBlock
Text=`$"You clicked {Counter} time(s)"`
Visibility=`Counter > 0 ? Visibility.Visible : Visbility.Collapsed`
/>
</StackPanel>
</root>
""")]
public partial class CounterPage : Page;
And that's it.
Documentation
Example Project
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0-windows10.0.26100 is compatible. |
-
net10.0-windows10.0.26100
- Microsoft.Windows.SDK.BuildTools (>= 10.0.28000.1839)
- Microsoft.WindowsAppSDK (>= 2.1.3)
- QuickMarkup (>= 0.1.6)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.