AlohaKit.UI
1.0.1
See the version list below for details.
dotnet add package AlohaKit.UI --version 1.0.1
NuGet\Install-Package AlohaKit.UI -Version 1.0.1
<PackageReference Include="AlohaKit.UI" Version="1.0.1" />
paket add AlohaKit.UI --version 1.0.1
#r "nuget: AlohaKit.UI, 1.0.1"
// Install AlohaKit.UI as a Cake Addin #addin nuget:?package=AlohaKit.UI&version=1.0.1 // Install AlohaKit.UI as a Cake Tool #tool nuget:?package=AlohaKit.UI&version=1.0.1
AlohaKit UI
<div align="center"> <a href="https://www.nuget.org/packages/AlohaKit.UI"><img src="https://img.shields.io/nuget/v/AlohaKit.UI?color=blue&style=flat-square&logo=nuget"></a> <a href="https://www.nuget.org/packages/AlohaKit.UI"><img src="https://img.shields.io/nuget/dt/AlohaKit.UI.svg?style=flat-square"></a> <a href="./LICENSE"><img src="https://img.shields.io/github/license/jsuarezruiz/AlohaKit.UI?style=flat-square"></a> </div>
This library offers an easier way to create drawn controls in .NET MAUI in both XAML and C#.
It includes a new CanvasView control that allows content such as drawn Layouts or Views so that it creates a single native view that creates the native Canvas but the rest of the child elements become fully drawn and managed by the Canvas.
XAML
<alohakit:CanvasView>
<alohakit:Rectangle
WidthRequest="50" HeightRequest="50"
X="30" Y="30"
ScaleX="0.5" ScaleY="0.5"
Fill="Green" />
<alohakit:RoundRectangle
WidthRequest="50" HeightRequest="50"
X="120" Y="10"
CornerRadius="12, 0, 0, 24"
Fill="Orange" />
<alohakit:Ellipse
WidthRequest="50" HeightRequest="50"
X="130" Y="70">
<alohakit:Ellipse.Fill>
<LinearGradientBrush StartPoint="0, 0" EndPoint="1, 0">
<LinearGradientBrush.GradientStops>
<GradientStop Color="Red" />
<GradientStop Color="Yellow" Offset="1" />
</LinearGradientBrush.GradientStops>
</LinearGradientBrush>
</alohakit:Ellipse.Fill>
</alohakit:Ellipse>
</alohakit:CanvasView>
C#
CanvasView()
.Children({
Rectangle()
.X(10).Y(10)
.Height(80).Width(80)
.Fill(Colors.Red),
Ellipse()
.X(10).Y(100)
.Height(80).Width(80)
.Fill(Colors.Orange),
Label()
.X(10).Y(200)
.Height(20).Width(100)
.Text("Label"),
});
This way, instead of needing to use the .NET MAUI Graphics Canvas extension methods, you use XAML or C# in a similar way to how you would normally create UI in .NET MAUI.
What if it could be even simpler?
You also have the From Figma to AlohaKit UI tool available.
Turns your Figma design into AlohaKit UI code.
Contribute
Do you want to contribute?.
Found a Bug?
If you find a bug, you can help me by submitting an issue. Even better, you can submit a Pull Request with a fix.
Copyright and license
Code released under the MIT license.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net7.0 is compatible. net7.0-android was computed. net7.0-android33.0 is compatible. net7.0-ios was computed. net7.0-ios16.1 is compatible. net7.0-maccatalyst was computed. net7.0-maccatalyst16.1 is compatible. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net7.0-windows10.0.19041 is compatible. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
-
net7.0
- No dependencies.
-
net7.0-android33.0
- No dependencies.
-
net7.0-ios16.1
- No dependencies.
-
net7.0-maccatalyst16.1
- No dependencies.
-
net7.0-windows10.0.19041
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.