All Projects → dotnet → Microsoft.Maui.Graphics.Controls

dotnet / Microsoft.Maui.Graphics.Controls

Licence: MIT license
Experimental Microsoft.Maui.Graphics.Controls - Build drawn controls (Cupertino, Fluent and Material)

Programming Languages

C#
18002 projects

Projects that are alternatives of or similar to Microsoft.Maui.Graphics.Controls

ExpectAnimXamarin
Xamarin.Android Binding, describe your animation and just run
Stars: ✭ 18 (-96.72%)
Mutual labels:  xamarin, fluent
Xamarin.iOS.DatePickerDialog
Xamarin iOS C# port of https://github.com/squimer/DatePickerDialog-iOS-Swift
Stars: ✭ 24 (-95.63%)
Mutual labels:  xamarin, controls
Graphicscontrols
Experimental GraphicsControls - Build drawn controls (Cupertino, Fluent and Material)
Stars: ✭ 149 (-72.86%)
Mutual labels:  xamarin, fluent
xappium.uitest
Xappium.UITest is a UITest helper framework built on top of Appium. This aims at making it easier to write and run UI Tests.
Stars: ✭ 60 (-89.07%)
Mutual labels:  dotnet-maui
xamarin-forms-to-net-maui
This repository is a compilation with documentation, examples and tips when converting code from Xamarin.Forms to .NET MAUI.
Stars: ✭ 101 (-81.6%)
Mutual labels:  dotnet-maui
FluentExcel
Use Fluent API to configure POCO excel behaviors, and then provides IEnumerable<T> has save to and load from excel functionalities.
Stars: ✭ 73 (-86.7%)
Mutual labels:  fluent
fluent-postgres-driver
🐘 PostgreSQL driver for Fluent.
Stars: ✭ 120 (-78.14%)
Mutual labels:  fluent
Krypton-Toolkit-Suite-Extended-NET-5.470
An extension to the Krypton Toolkit suite of controls for .NET framework 4.7
Stars: ✭ 51 (-90.71%)
Mutual labels:  controls
Cognitive-Face-Xamarin
A client library that makes it easy to work with the Microsoft Cognitive Services Face API on Xamarin.iOS, Xamarin.Android, and Xamarin.Forms and/or Portable Class Libraries.
Stars: ✭ 18 (-96.72%)
Mutual labels:  xamarin
fluent-mysql-driver
🖋🐬 Swift ORM (queries, models, relations, etc) built on MySQL.
Stars: ✭ 69 (-87.43%)
Mutual labels:  fluent
platform info
Containts info about current platform such as Build mode and Operating system
Stars: ✭ 21 (-96.17%)
Mutual labels:  cupertino
angular-odata-es5
OData Service for Angular.io (es5 version)
Stars: ✭ 45 (-91.8%)
Mutual labels:  fluent
YoApp
YoApp, messaging suite with batteries included!
Stars: ✭ 17 (-96.9%)
Mutual labels:  xamarin
flutter base
实现一套代码,2种风格,ios使用Cupertino风格组件,andriod、fuchsia使用Material风格组件
Stars: ✭ 23 (-95.81%)
Mutual labels:  cupertino
ShortcutBadger
Xamarin.Android library supports badge notification like iOS in Samsung, LG, Sony and HTC launchers. Port of
Stars: ✭ 24 (-95.63%)
Mutual labels:  xamarin
maui-samples
Samples for .NET Multi-Platform App UI (.NET MAUI)
Stars: ✭ 1,965 (+257.92%)
Mutual labels:  dotnet-maui
XPlugins.iOS.BEMCheckBox
Use the BEMCheckBox in Xamarin.
Stars: ✭ 19 (-96.54%)
Mutual labels:  xamarin
website
Fully responsive website built with NextJS, React and Fluent UI, with the aim of providing services and access to all groups of didactic courses and general purposes to students of the University of Milan.
Stars: ✭ 29 (-94.72%)
Mutual labels:  fluent
paginator
Offset pagination for Vapor 🗂
Stars: ✭ 67 (-87.8%)
Mutual labels:  fluent
MediaFlyout
Windows 10+ Media Control Taskbar Flyout
Stars: ✭ 87 (-84.15%)
Mutual labels:  fluent

Microsoft.Maui.Graphics.Controls: Pixel-Perfect Drawn Controls for .NET MAUI

Build Status

Microsoft.Maui.Graphics.Controls is a .NET MAUI experiment that offers cross-platform, pixel-perfect, drawn controls, with three built-in themes: Cupertino, Fluent and Material.

NOTE: Want to see all of this in action? Have a look at this video

Microsoft.Maui.Graphics

This project uses Microsoft.Maui.Graphics to draw the controls. Microsoft.Maui.Graphics is a cross-platform graphics library for iOS, Android, Windows, macOS and Linux completely built in C#.

This library allows you to use a common API across multiple platforms allowing you to share your drawing code between them, or mix and match graphics implentations within a single application.

How To Use This Library

At the moment this library is experimental. Because of this we are distributing it as a NuGet package on a separate feed (aka nightly).

If you want to try it out, add the nightly feed to your NuGet sources or add a NuGet.config file like below and install the Microsoft.Maui.Graphics.Controls package.

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <packageSources>
    <clear />
    <add key="maui-graphics-controls-nightly" value="https://aka.ms/maui-graphics-controls-nightly/index.json" />
    <add key="NuGet.org" value="https://api.nuget.org/v3/index.json" />
  </packageSources>
</configuration>

After adding the Microsoft.Maui.Graphics.Controls package, modify the MauiProgram class to register the drawn control handlers:

public static class MauiProgram
{
    public static MauiApp CreateMauiApp()
    {
        var appBuilder = MauiApp.CreateBuilder();

        appBuilder
            .UseMauiApp<App>()
            .ConfigureGraphicsControls();

        return appBuilder.Build();
    }
}

What controls are available?

Currently, the following controls are available:

Control Cupertino Fluent Material
Button
CheckBox
DatePicker
Editor
Entry
ProgressBar
RadioButton
Slider
Stepper
Switch
TimePicker

The controls above have the same properties and events as they exist in Xamarin.Forms/.NET MAUI today.

Features

The main features are:

Drawn controls

The supported controls are fully drawn by using the Microsoft.Maui.Graphics library. This means you will get pixel perfect rendering on all supported platforms. Have a look at the Stepper control showing the IsEnabled state in the image below.

Different Looks

Each control implements 3 looks: Cupertino, Material and Fluent. As you might have gotten from the names, these mimic the native look of iOS, Android and Windows respectively.

On top of that, you can easily add your own custom look and theming to each control as you wish.

Easy to extend

Do you want to extend a drawn control? Create your own control class, inherit from the drawn control and override the Draw method. This allows you to implement your own drawing logic entirely.

public class CustomControl : GraphicsView
{
    public override void Draw(ICanvas canvas, RectangleF dirtyRect)
    {
        base.Draw(canvas, dirtyRect);
    }
}

However, if you just want to customize one part of a control, you just have to overwrite the method that draws the layer for this control.

public class CustomSlider : Slider
{
    protected override void DrawSliderThumb(ICanvas canvas, RectangleF dirtyRect)
    {
        base.DrawSliderThumb(canvas, dirtyRect);
    }
}

Additionally you can also add completely new layers, delete existing layers or reorganize the priority when drawing the layers to achieve the exact look and feel you're after.

Dark Theme support

All controls, in the different visual modes (Cupertino, Fluent and Material) supports both light and dark theme. Below you can see an example of various controls switching between the two modes.

RTL support (Work in progress)

All controls support Right-To-Left (RTL) out of the box. Have a look at the Stepper control showing both RTL and LTR in the image below.

Mobile & Desktop support

The implemented controls are useable on both mobile and desktop platforms. In the image below you can see an example of the controls running on macOS.

Accessibility support

Building an accessible application ensures that the application is usable by people who approach the user interface with a range of needs and experiences.

With these controls you will be able to set properties to influence the native accessibility features on each platform. This way we can make apps the best experience for everyone.

(Work in progress)

Performance

Some native controls are complex. For example, Entry using Visual Material is made up of different elements. When using it, each of the different elements must be instantiated (the text box, the placeholder text, etc.). Using the drawn control, create an instance of a Canvas and draw the content. The time required to instantiate etc is shorter.

Goals

  • Have pixel-perfect drawn controls working on all the .NET MAUI supported platforms.
  • High performance and customization options controls.

Contributing

As an experimental project, there are several active areas of development and we're looking for your feedback to help set the direction for this project. Please check it out and let us know any feedback you have on the project by logging issues in this repo.

If you want to help develop this library, have a look at the issues that are labeled help wanted, community or good first issue.

Thank you!

Copyright and license

All code is released under the MIT license.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].