menu

MAUI

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

    Show / Hide Table of Contents

    Class TreeMapRangeBrush

    Represents the settings for defining a range brush in the SfTreeMap.

    Inheritance
    System.Object
    TreeMapRangeBrush
    Namespace: Syncfusion.Maui.TreeMap
    Assembly: Syncfusion.Maui.TreeMap.dll
    Syntax
    public class TreeMapRangeBrush : BindableObject

    Constructors

    TreeMapRangeBrush()

    Declaration
    public TreeMapRangeBrush()

    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.

    LegendLabelProperty

    Identifies the LegendLabel dependency property.

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

    The identifier for LegendLabel 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 range 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.

    Remarks

    The background brush for the range can be set using this property. It defines the color applied to specific items based on the value specified in RangeColorValuePath.

    Examples

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

    • XAML
    • C#
      <treemap:SfTreeMap x:Name="treeMap">
       <treemap:SfTreeMap.LeafItemBrushSettings>
           <treemap:TreeMapRangeBrushSettings>
               <treemap:TreeMapRangeBrushSettings.RangeBrushes>
                   <treemap:TreeMapRangeBrush Brush="#77D8D8" />
               </treemap:TreeMapRangeBrushSettings.RangeBrushes>
           </treemap:TreeMapRangeBrushSettings>
       </treemap:SfTreeMap.LeafItemBrushSettings>
    </treemap:SfTreeMap>
    this.treeMap.LeafItemBrushSettings = new TreeMapRangeBrushSettings()
    {
        RangeBrushes = new List<TreeMapRangeBrush>()
        {
             new TreeMapRangeBrush() { Brush = new SolidColorBrush(Color.FromArgb("#77D8D8"))},
        }
    };
    See Also
    RangeColorValuePath
    From
    To
    LegendLabel

    From

    Gets or sets the starting value of the range for the background brush in the SfTreeMap.

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

    The default value of From is double.NaN.

    Remarks

    This property defines the starting value of the range for which the background brush is applied. It is used in conjunction with the To property to define the range. The background brush is applied based on the value specified in the RangeColorValuePath.

    Examples

    The below examples shows, how to set From property of TreeMapRangeBrush in the SfTreeMap.

    • XAML
    • C#
      <treemap:SfTreeMap x:Name="treeMap">
       <treemap:SfTreeMap.LeafItemBrushSettings>
           <treemap:TreeMapRangeBrushSettings>
               <treemap:TreeMapRangeBrushSettings.RangeBrushes>
                   <treemap:TreeMapRangeBrush From="10" Brush="#77D8D8" />
               </treemap:TreeMapRangeBrushSettings.RangeBrushes>
           </treemap:TreeMapRangeBrushSettings>
       </treemap:SfTreeMap.LeafItemBrushSettings>
    </treemap:SfTreeMap>
    this.treeMap.LeafItemBrushSettings = new TreeMapRangeBrushSettings()
    {
        RangeBrushes = new List<TreeMapRangeBrush>()
        {
             new TreeMapRangeBrush() { Brush = new SolidColorBrush(Color.FromArgb("#77D8D8")),From = 10},
        }
    };
    See Also
    RangeColorValuePath
    Brush
    To
    LegendLabel

    LegendLabel

    Gets or sets the text for the legend item associated with the range in the SfTreeMap.

    Declaration
    public string LegendLabel { get; set; }
    Property Value
    Type Description
    System.String

    The default value of LegendLabel is strime.Empty.

    Remarks

    This property specifies the text for the legend item corresponding to the range defined by the From and To properties. The legend label is displayed along with the corresponding color of the TreeMapLegendSettings in the SfTreeMap.

    Examples

    The below examples shows, how to set LegendLabel property of TreeMapRangeBrush in the SfTreeMap.

    • XAML
    • C#
      <treemap:SfTreeMap x:Name="treeMap">
       <treemap:SfTreeMap.LeafItemBrushSettings>
           <treemap:TreeMapRangeBrushSettings>
               <treemap:TreeMapRangeBrushSettings.RangeBrushes>
                   <treemap:TreeMapRangeBrush LegendLabel="1 % Growth" From="10" To="15" Brush="#77D8D8" />
               </treemap:TreeMapRangeBrushSettings.RangeBrushes>
           </treemap:TreeMapRangeBrushSettings>
       </treemap:SfTreeMap.LeafItemBrushSettings>
    </treemap:SfTreeMap>
    this.treeMap.LeafItemBrushSettings = new TreeMapRangeBrushSettings()
    {
        RangeBrushes = new List<TreeMapRangeBrush>()
        {
            new TreeMapRangeBrush(){ LegendLabel ="1 % Growth", Brush = new SolidColorBrush(Color.FromArgb("#77D8D8")), From =10, To = 15,},
        }
    };
    See Also
    RangeColorValuePath
    Brush
    From
    To

    To

    Gets or sets the ending value of the range for the background brush in the SfTreeMap.

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

    The default value of To is double.NaN.

    Remarks

    This property defines the ending value of the range for which the background brush is applied. It is used in conjunction with the From property to define the range. The background brush is applied based on the value specified in the RangeColorValuePath.

    Examples

    The below examples shows, how to set To property of TreeMapRangeBrush in the SfTreeMap.

    • XAML
    • C#
      <treemap:SfTreeMap x:Name="treeMap">
       <treemap:SfTreeMap.LeafItemBrushSettings>
           <treemap:TreeMapRangeBrushSettings>
               <treemap:TreeMapRangeBrushSettings.RangeBrushes>
                   <treemap:TreeMapRangeBrush To="15" Brush="#77D8D8" />
               </treemap:TreeMapRangeBrushSettings.RangeBrushes>
           </treemap:TreeMapRangeBrushSettings>
       </treemap:SfTreeMap.LeafItemBrushSettings>
    </treemap:SfTreeMap>
    this.treeMap.LeafItemBrushSettings = new TreeMapRangeBrushSettings()
    {
        RangeBrushes = new List<TreeMapRangeBrush>()
        {
             new TreeMapRangeBrush() { Brush = new SolidColorBrush(Color.FromArgb("#77D8D8")),To = 15},
        }
    };
    See Also
    RangeColorValuePath
    Brush
    From
    LegendLabel
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved