Adornments

Visually preview color values inline in the XAML editor

Introduction

One of the challenges of working with colors in Xamarin.Forms

Color Adornments Performance Impacts

By default, color adornments are not enabled for the XAML editor. Due to rendering constraints, color adornments can have an adverse impact on IntelliSense performance.

To enable color adornments, open MFractors Preferences and then go to Settings -> Feature Flags and toggle Color Adornments.

Hex Color Adornments

When MFractor detects a hexadecimal color declaration, it will evaluate that color and inject a small preview of that color:

Hexadecimal color adornments

Named Color Adornments

When MFractor detects a color attribute that assigns a named color constant (such as Red, SlateBlue, Green etc), it will evaluate the named color and inject a small preview of that color:

Named color adornments

Static Resource Color Adornments

When MFractor detects a static resource expression that returns a color resource, it will evaluate the static resource and inject a small preview of the declared color:

Hexadecimal color adornments

Comments