menu

MAUI

  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class TreeMapUniformBrushSettings - MAUI API Reference | Syncfusion

    Show / Hide Table of Contents

    Class TreeMapUniformBrushSettings

    Provides settings for assigning a single color to represent data uniformly in the SfTreeMap.

    Inheritance
    System.Object
    TreeMapBrushSettings
    TreeMapUniformBrushSettings
    Namespace: Syncfusion.Maui.TreeMap
    Assembly: Syncfusion.Maui.TreeMap.dll
    Syntax
    public class TreeMapUniformBrushSettings : TreeMapBrushSettings

    Constructors

    TreeMapUniformBrushSettings()

    Declaration
    public TreeMapUniformBrushSettings()

    Fields

    BrushProperty

    Identifies the Brush dependency property.

    Declaration
    public static readonly BindableProperty BrushProperty
    Field Value
    Type Description
    Microsoft.Maui.Controls.BindableProperty

    The identifier for Brush dependency property.

    Properties

    Brush

    Gets or sets the background brush for the tree map leaf items in the SfTreeMap.

    Declaration
    public Brush Brush { get; set; }
    Property Value
    Type Description
    Microsoft.Maui.Controls.Brush

    The default value of Brush is Microsoft.Maui.Controls.Brush.Gray.

    Examples

    The below examples shows, how to set Brush property of TreeMapUniformBrushSettings in the SfTreeMap.

    • XAML
    • C#
    • C#
    • C#
     <treemap:SfTreeMap x:Name="treeMap"
                        PrimaryValuePath="EmployeesCount"
                        DataSource="{Binding EmployeeDetails}">
       <treemap:SfTreeMap.BindingContext>
           <local:EmployeeViewModel />
       </treemap:SfTreeMap.BindingContext>
      <treemap:SfTreeMap.LeafItemBrushSettings>
           <treemap:TreeMapUniformBrushSettings Brush="Orange">
           </treemap:TreeMapUniformBrushSettings>
       </treemap:SfTreeMap.LeafItemBrushSettings>
       <treemap:SfTreeMap.LeafItemSettings>
           <treemap:TreeMapLeafItemSettings LabelPath="JobDescription">
           </treemap:TreeMapLeafItemSettings>
       </treemap:SfTreeMap.LeafItemSettings>
    </treemap:SfTreeMap>
    public class EmployeeDetails
    {
       public string Category { get; set; }
       public string Country { get; set; }
       public string JobDescription { get; set; }
       public string JobGroup { get; set; }
       public int EmployeesCount { get; set; }
    }
    public class EmployeeViewModel
    {
        public EmployeeViewModel()
        {
           this.EmployeeDetails = new ObservableCollection<EmployeeDetails>()
           {
               new EmployeeDetails() { Category = "Employees", Country = "India", JobDescription = "Technical", JobGroup = "Testers", EmployeesCount = 100 },
               new EmployeeDetails() { Category = "Employees", Country = "India", JobDescription = "HR Executives", EmployeesCount = 30 },
               new EmployeeDetails() { Category = "Employees", Country = "India", JobDescription = "Accounts", EmployeesCount = 40 },
           };
        }
       public ObservableCollection<EmployeeDetails> EmployeeDetails
       {
           get;
           set;
        }
    }
     this.treeMap.LeafItemBrushSettings = new TreeMapUniformBrushSettings() { Brush = Brush.Orange };
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved