Xuni Product Documentation - Xamarin.Forms
Customize Appearance

Although, Xuni controls match the native controls on all three platforms by default and are designed to work with both: light and dark themes available on all platforms. But, there are several properties available that let you customize the gauge elements to make it visually attractive. The following code example demonstrates how to set different styling properties to customize a RadialGauge.

The following image shows how the RadialGauge appears after its appearance is customized.

The following code example demonstrates how to customize the gauge in C#. The example uses the sample created in the RadialGauge Quick Start section.

In Code

C#
Copy Code
//Customize Gauge
gauge.ShowText = GaugeShowText.All;
gauge.Thickness = 0.5;
gauge.FaceBorderColor = Color.FromHex("#cfd1d4");
gauge.FaceBorderWidth = 5;

gauge.MinTextColor = Color.White;
gauge.MaxTextColor = Color.White;
gauge.MinFontSize = 10;
gauge.MaxFontSize = 10;

//Customize Range Appearance
low.Color = Color.FromHex("#C1E1C9");
med.Color = Color.FromHex("#fdfdc8");
high.Color = Color.FromHex("#f6e4ed");

//Customize Pointer Appearance
gauge.Pointer.Thickness = 0.5; 
gauge.PointerColor = Color.FromHex("#0a02f4");

 

 


Copyright © GrapeCity, inc. All rights reserved.

Product Support Forum  |  Documentation Feedback