Docs and Samples π
Rendering engine for .NET MAUI with gestures and animations and much more, powered by SkiaSharp.
Supports iOS, MacCatalyst, Android, Windows with hardware acceleration.
Please note this is a .NET9 library, entry controls are not yet fully compatible with .NET10 due to MAUI changes.
- To use inside a usual MAUI app, by wrapping drawn controls into
Canvasviews. - To create a totally drawn apps with just one
Canvasas root view. - Drawn controls are totally virtual, no native views/handlers.
- Design in XAML or code-behind
- Free to use under the MIT license, nuget package available.
- Use virtual controls to draw your UI
- Create your own animated pixel-perfect controls
- Port existing native controls to drawn
- Design in XAML or code-behind
- 2D and 3D Transforms
- Visual effects for every control, filters and shaders
- Animations targeting max FPS
- Caching system for faster re-drawing
- Optimized for performance, rendering only visible elements, recycling templates etc
- Gestures support for anything, panning, scrolling, zooming etc
- Keyboard support, track any key
- Navigate on the canvas with MAUI Shell-like techniques
- Fix iOS simulator incorrect layouts bug, due
(int)Math.Ceiling(float.PositiveInfinity)returning a negative value on simulator runtime, other runtimes return positive value as expected. - Fix
SkiaSlidertap on Thumb not triggered if deep cached until redrawn. - Fix gesture mapping coordinates inside many cached levels.
- Added some new helper functions to track gestures, more in gestures doc.
- Fix
SkiaLabeltext offset when stroke is enabled. - Fix
SkiaCarouselsometimes not snapping after different gestures. SkiaScrollscrolling smoothness improved, and some other fixes.- Added
SkiaDecoratedStackto draw decorated lines between lines/columns. - Added new props for grid and stack layout, more in layouts doc.
SkiaCameraaudio recording improved, added callbacks to process audio samples in realtime and other improvements. More info about new camera video/audio realtime features to come soon.- Can now chain many shaders via VisualEffects.
- Other fixes and improvements.
β Q: How to make images to Fade-In when loaded?
π‘ A: Subclass SkiaImage to define your animation:
public class BannerImage : SkiaImage
{
public override void OnSuccess(string source)
{
base.OnSuccess(source);
this.Opacity = 0.01;
_ = this.FadeToAsync(1, 300, Easing.SinIn);
}
}Install the package:
dotnet add package DrawnUi.MauiInitialize in MauiProgram.cs:
builder.UseDrawnUi();Use in XAML:
<ContentPage xmlns:draw="http://schemas.appomobi.com/drawnUi/2023/draw">
<draw:Canvas Gestures="Enabled">
<draw:SkiaLayout Type="Column" Spacing="16" Padding="32">
<draw:SkiaLabel Text="Hello DrawnUI" FontSize="24" />
<draw:SkiaButton Text="Click Me" Tapped="OnButtonClicked" />
</draw:SkiaLayout>
</draw:Canvas>
</ContentPage>Need more performance? Set canvas RenderingMode to Accelerated.
See the Getting Started Guide for details.
Do not miss the Tutorials Project on how to create your custom control, a recycled cells scroller and more.
Demo Projects:
- Tutorials - First steps, bindings, recycled cells
- Sandbox Project - Playground for custom controls, shaders, camera, maps etc
- Engine Demo - Navigation, recycled cells, camera integration
- Shaders Carousel - Advanced SkiaSharp v3 effects
- Space Shooter - 2D Arcade Game Etude
Open-Source Published Apps:
- Filters Camera - Real-time camera filters (AppStore, Google Play)
- Bricks Breaker - 2D Arkanoid/Breakout arcade game (AppStore, Google Play)
Please star β if you like it!
Q: What is the difference between DrawnUi and other drawn frameworks?
A: It is not a framework but a library for .NET MAUI, to make creating drawn UI easy for everyone.
Q: Why use DrawnUI instead of native controls?
A: Gives you complete control over rendering and appearance and can be much more performant for complex UIs.
Q: Do I need to know SkiaSharp?
A: No. Use the prebuilt controls and customize them. All controls are designed to be subclassed and most methods are virtual.
Q: Can I use XAML/code-behind?
A: Yes, both XAML and code-behind are supported.
Q: Can I embed native MAUI controls?
A: Yes, use SkiaMauiElement to wrap native controls like WebView inside your drawn UI.
Q: Can I embed drawn controls into my usual MAUI app?
A: Yes, use Canvas to wrap drawn controls inside your MAUI UI.
Documentation β’ Tutorials β’ Controls Reference Under development