menu

MAUI

  • User Guide
  • Demos
  • Support
  • Forums
  • Download

    Show / Hide Table of Contents

    Class TreeMapDesaturationBrushSettings

    Represents the settings for desaturation in the SfTreeMap control, allowing customization of the background brush and desaturation range.

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

    Constructors

    TreeMapDesaturationBrushSettings()

    Declaration
    public TreeMapDesaturationBrushSettings()

    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.

    FromProperty

    Identifies the From dependency property.

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

    The identifier for From dependency property.

    ToProperty

    Identifies the To dependency property.

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

    The identifier for To dependency property.

    Properties

    Brush

    Gets or sets the background brush for the desaturation 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.Red.

    Examples

    The below examples shows, how to set Brush property of TreeMapDesaturationBrushSettings 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:TreeMapDesaturationBrushSettings Brush="BlueViolet">
           </treemap:TreeMapDesaturationBrushSettings>
       </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 TreeMapDesaturationBrushSettings() { Brush = Brush.BlueViolet };
    See Also
    From
    To

    From

    Gets or sets the starting value for the desaturation range in the SfTreeMap.

    Declaration
    public double From { get; set; }
    Property Value
    Type Description
    System.Double

    The default value of From is 1.

    Examples

    The below examples shows, how to set From property of TreeMapDesaturationBrushSettings 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:TreeMapDesaturationBrushSettings Brush="BlueViolet"
                                                     From="0.9">
           </treemap:TreeMapDesaturationBrushSettings>
       </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 TreeMapDesaturationBrushSettings() { Brush = Brush.BlueViolet, From = 0.9 };
    See Also
    Brush
    To

    To

    Gets or sets the ending value for the desaturation range in the SfTreeMap.

    Declaration
    public double To { get; set; }
    Property Value
    Type Description
    System.Double

    The default value of To is 0.1.

    Examples

    The below examples shows, how to set To property of TreeMapDesaturationBrushSettings 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:TreeMapDesaturationBrushSettings Brush="BlueViolet"
                                                     To="0.5">
           </treemap:TreeMapDesaturationBrushSettings>
       </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 TreeMapDesaturationBrushSettings() { Brush = Brush.BlueViolet, To = 0.5 };
    See Also
    Brush
    From
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved