Experimental Microsoft.Maui.Graphics.Controls - Build drawn controls (Cupertino, Fluent and Material)
Перейти к файлу
Javier Suárez Ruiz a90b4241c0 Updated README 2021-01-04 12:06:29 +01:00
System.Graphics@2b148b7f9c Added submodule 2020-12-22 18:04:24 +01:00
data Added benckmark samples 2021-01-03 17:57:04 +01:00
images Updated README 2021-01-03 19:29:07 +01:00
src Added benckmark samples 2021-01-03 17:57:04 +01:00
.gitattributes Added gitignore 2020-12-20 18:31:57 +01:00
.gitignore Added gitignore 2020-12-20 18:31:57 +01:00
.gitmodules Added submodule 2020-12-22 18:04:24 +01:00
README.md Updated README 2021-01-04 12:06:29 +01:00

README.md

GraphicsControls

Xamarin.Forms allows you to define the user interface once for multiple platforms. It offers an abstraction layer that is converted on each platform into native controls.

While the native controls proposal is great as it offers the native experience (appearance, performance, etc). it has certain adjacent limitations like customization possibilities etc.

What if you could choose at any time between using the native control or a control drawn with the native look and feel?

GraphicsControls is a library that offers the controls available in Xamarin.Forms Visual allowing to choose between Cupertino, Fluent and Material but, instead of creating native controls, are drawn controls.

There is currently support for:

  • iOS using CoreGraphics
  • macOS using CoreGraphics
  • Android using Android Graphics
  • UWP using Win2D

Soon, support will be added to:

  • Linux using SkiaSharp
  • Tizen using SkiaSharp
  • WPF using SharpDX

What controls are available?

Currently there are the following controls:

  • ActivityIndicator (Cupertino, Fluent, Material)
  • BoxView
  • Button (Cupertino, Fluent, Material)
  • CheckBox (Cupertino, Fluent, Material)
  • Entry (Cupertino, Fluent, Material)
  • ProgressBar (Cupertino, Fluent, Material)
  • RadioButton (Cupertino, Fluent, Material)
  • Slider (Cupertino, Fluent, Material)
  • Stepper (Cupertino, Fluent, Material)
  • Switch (Cupertino, Fluent, Material)

Upcoming controls:

  • Editor
  • DatePicker
  • TimePicker

The controls have the same properties and events as those existing in Xamarin.Forms.

Features

The main features are:

Drawn controls

The controls are drawn getting a pixel perfect option to adjust in the same way on all the platforms.

Easy to extend

Do you want to customize a drawn control? Create your own control class, inherit from the drawn control and override the Draw method.

Dark Theme support

All controls, in the different visual modes (Cupertino, Fluent and Material) supports both light and dark theme.

RTL support (Work in progress)

All controls support RTL.

Mobile & Desktop support

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.