menu

MAUI

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

    Show / Hide Table of Contents

    Class TreeMapToolTipSettings

    Provides settings for configuring tool tips in the SfTreeMap.

    Inheritance
    System.Object
    TreeMapToolTipSettings
    Namespace: Syncfusion.Maui.TreeMap
    Assembly: Syncfusion.Maui.TreeMap.dll
    Syntax
    public class TreeMapToolTipSettings : Element, IThemeElement
    Remarks

    The Background property defines the background brush for the tool tip. The Duration property determines the duration for which the tool tip is displayed. The TextStyle property specifies the style for the text in the tool tip. The Stroke property sets the stroke brush for the tool tip.

    Constructors

    TreeMapToolTipSettings()

    Initializes a new instance of the TreeMapToolTipSettings class.

    Declaration
    public TreeMapToolTipSettings()

    Fields

    BackgroundProperty

    Identifies the Background dependency property.

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

    The identifier for Background dependency property.

    DurationProperty

    Identifies the Duration dependency property.

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

    The identifier for Duration dependency property.

    StrokeProperty

    Identifies the Stroke dependency property.

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

    The identifier for Stroke dependency property.

    TextStyleProperty

    Identifies the TextStyle dependency property.

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

    The identifier for TextStyle dependency property.

    Properties

    Background

    Gets or sets the background brush for tool tips in the SfTreeMap.

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

    The default value of Background is new SolidColorBrush(Color.FromArgb("#1C1B1F"))/>.

    Remarks

    This property will be applicable to only when the ShowToolTip is enabled.

    Examples

    The below examples shows, how to set Background property of TreeMapToolTipSettings in the SfTreeMap.

    • XAML
    • C#
    • C#
    • C#
     <treemap:SfTreeMap x:Name="treeMap"
                        ShowToolTip="True"
                        PrimaryValuePath="EmployeesCount"
                        DataSource="{Binding EmployeeDetails}">
       <treemap:SfTreeMap.BindingContext>
           <local:EmployeeViewModel />
       </treemap:SfTreeMap.BindingContext>
       <treemap:SfTreeMap.ToolTipSettings>
           <treemap:TreeMapToolTipSettings Background="Red">
           </treemap:TreeMapToolTipSettings>
       </treemap:SfTreeMap.ToolTipSettings>
      <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.ShowToolTip = true;
    this.treeMap.ToolTipSettings = new TreeMapToolTipSettings() { Background = Brush.Red };
    See Also
    Duration
    TextStyle
    Stroke

    Duration

    Gets or sets the duration for which tool tips are displayed in the SfTreeMap.

    Declaration
    public TimeSpan Duration { get; set; }
    Property Value
    Type Description
    System.TimeSpan

    The default value of Duration is 2 seconds.

    Remarks

    This property will be applicable to only when the ShowToolTip is enabled.

    Examples

    The below examples shows, how to set Duration property of TreeMapToolTipSettings in the SfTreeMap.

    • XAML
    • C#
    • C#
    • C#
     <treemap:SfTreeMap x:Name="treeMap"
                        ShowToolTip="True"
                        PrimaryValuePath="EmployeesCount"
                        DataSource="{Binding EmployeeDetails}">
       <treemap:SfTreeMap.BindingContext>
           <local:EmployeeViewModel />
       </treemap:SfTreeMap.BindingContext>
       <treemap:SfTreeMap.ToolTipSettings>
           <treemap:TreeMapToolTipSettings Duration="0:0:10">
           </treemap:TreeMapToolTipSettings>
       </treemap:SfTreeMap.ToolTipSettings>
      <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.ShowToolTip = true;
    this.treeMap.ToolTipSettings = new TreeMapToolTipSettings() { Duration = TimeSpan.FromSeconds(10) };
    See Also
    Background
    TextStyle
    Stroke

    Stroke

    Gets or sets the stroke color for the tool tips in the SfTreeMap.

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

    The default value of Stroke is new SolidColorBrush(Color.FromArgb("#1C1B1F")).

    Remarks

    This property will be applicable to only when the ShowToolTip is enabled.

    Examples

    The below examples shows, how to set Stroke property of TreeMapToolTipSettings in the SfTreeMap.

    • XAML
    • C#
    • C#
    • C#
     <treemap:SfTreeMap x:Name="treeMap"
                        ShowToolTip="True"
                        PrimaryValuePath="EmployeesCount"
                        DataSource="{Binding EmployeeDetails}">
       <treemap:SfTreeMap.BindingContext>
           <local:EmployeeViewModel />
       </treemap:SfTreeMap.BindingContext>
       <treemap:SfTreeMap.ToolTipSettings>
           <treemap:TreeMapToolTipSettings Stroke="Green">
           </treemap:TreeMapToolTipSettings>
       </treemap:SfTreeMap.ToolTipSettings>
      <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.ShowToolTip = true;
    this.treeMap.ToolTipSettings = new TreeMapToolTipSettings() { Stroke = Brush.Green };
    See Also
    Background
    TextStyle
    Duration

    TextStyle

    Gets or sets the style of tool tips text, that used to customize the text color, font, font size, font family and font attributes.

    Declaration
    public TreeMapTextStyle TextStyle { get; set; }
    Property Value
    Type Description
    TreeMapTextStyle

    The default value of TextColor is Microsoft.Maui.Graphics.Colors.White, FontSize is 12, FontFamily is null, FontAttributes is Microsoft.Maui.Controls.FontAttributes.None

    Remarks

    This property will be applicable to only when the ShowToolTip is enabled.

    Examples

    The below examples shows, how to set TextStyle property of TreeMapToolTipSettings in the SfTreeMap.

    • XAML
    • C#
    • C#
    • C#
     <treemap:SfTreeMap x:Name="treeMap"
                        ShowToolTip="True"
                        PrimaryValuePath="EmployeesCount"
                        DataSource="{Binding EmployeeDetails}">
       <treemap:SfTreeMap.BindingContext>
           <local:EmployeeViewModel />
       </treemap:SfTreeMap.BindingContext>
      <treemap:SfTreeMap.ToolTipSettings>
       <treemap:TreeMapToolTipSettings>
           <treemap:TreeMapToolTipSettings.TextStyle>
               <treemap:TreeMapTextStyle TextColor="Red"/>
           </treemap:TreeMapToolTipSettings.TextStyle>
       </treemap:TreeMapToolTipSettings>
      </treemap:SfTreeMap.ToolTipSettings>
      <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.ShowToolTip = true;
    this.treeMap.ToolTipSettings = new TreeMapToolTipSettings() { TextStyle = new TreeMapTextStyle() { TextColor = Colors.Red } };
    See Also
    Background
    Duration
    Stroke

    Methods

    OnBindingContextChanged()

    Invokes on the binding context of the view changed.

    Declaration
    protected override void OnBindingContextChanged()
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved