Class TreeMapLevel
Represents a level in the hierarchical structure of the SfTreeMap.
Inheritance
Namespace: Syncfusion.Maui.TreeMap
Assembly: Syncfusion.Maui.TreeMap.dll
Syntax
public class TreeMapLevel : Element, IThemeElement
Constructors
TreeMapLevel()
Initializes a new instance of the TreeMapLevel class.
Declaration
public TreeMapLevel()
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. |
GroupPathProperty
Identifies the GroupPath dependency property.
Declaration
public static readonly BindableProperty GroupPathProperty
Field Value
Type | Description |
---|---|
Microsoft.Maui.Controls.BindableProperty | The identifier for GroupPath dependency property. |
HeaderHeightProperty
Identifies the HeaderHeight dependency property.
Declaration
public static readonly BindableProperty HeaderHeightProperty
Field Value
Type | Description |
---|---|
Microsoft.Maui.Controls.BindableProperty | The identifier for HeaderHeight dependency property. |
SpacingProperty
Identifies the Spacing dependency property.
Declaration
public static readonly BindableProperty SpacingProperty
Field Value
Type | Description |
---|---|
Microsoft.Maui.Controls.BindableProperty | The identifier for Spacing 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. |
StrokeWidthProperty
Identifies the StrokeWidth dependency property.
Declaration
public static readonly BindableProperty StrokeWidthProperty
Field Value
Type | Description |
---|---|
Microsoft.Maui.Controls.BindableProperty | The identifier for StrokeWidth 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 the tree map header items in the SfTreeMap.
Declaration
public Brush Background { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.Maui.Controls.Brush | The default value of Background is null. |
Examples
The below examples shows, how to set Background property of TreeMapLevel in the SfTreeMap.
<treemap:SfTreeMap x:Name="treeMap"
PrimaryValuePath="EmployeesCount"
DataSource="{Binding EmployeeDetails}">
<treemap:SfTreeMap.BindingContext>
<local:EmployeeViewModel />
</treemap:SfTreeMap.BindingContext>
<treemap:SfTreeMap.Levels>
<treemap:TreeMapLevel GroupPath="Country"
Background="Green"/>
</treemap:SfTreeMap.Levels>
<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>
See Also
GroupPath
Gets or sets the property path used for grouping tree map items in the SfTreeMap.
Declaration
public string GroupPath { get; set; }
Property Value
Type | Description |
---|---|
System.String | The default value of GroupPath is System.String.Empty. |
Remarks
This property specifies the name of the property in the data object that determines how items in the tree map are grouped. The grouping is based on the values of this property in the data source, which splits the level into distinct groups.
Examples
The below examples shows, how to set GroupPath property of TreeMapLevel in the SfTreeMap.
<treemap:SfTreeMap x:Name="treeMap"
PrimaryValuePath="EmployeesCount"
DataSource="{Binding EmployeeDetails}">
<treemap:SfTreeMap.BindingContext>
<local:EmployeeViewModel />
</treemap:SfTreeMap.BindingContext>
<treemap:SfTreeMap.Levels>
<treemap:TreeMapLevel GroupPath="Country"
Stroke="Gray"/>
</treemap:SfTreeMap.Levels>
<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>
See Also
HeaderHeight
Gets or sets the height of the header for each level in the SfTreeMap.
Declaration
public double HeaderHeight { get; set; }
Property Value
Type | Description |
---|---|
System.Double | The default value of HeaderHeight is 24. |
Examples
The below examples shows, how to set HeaderHeight property of TreeMapLevel in the SfTreeMap.
<treemap:SfTreeMap x:Name="treeMap"
PrimaryValuePath="EmployeesCount"
DataSource="{Binding EmployeeDetails}">
<treemap:SfTreeMap.BindingContext>
<local:EmployeeViewModel />
</treemap:SfTreeMap.BindingContext>
<treemap:SfTreeMap.Levels>
<treemap:TreeMapLevel GroupPath="Country"
Stroke="Gray"
HeaderHeight="20">
</treemap:TreeMapLevel>
</treemap:SfTreeMap.Levels>
<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>
See Also
Spacing
Gets or sets the spacing between the tree map header items in the SfTreeMap.
Declaration
public double Spacing { get; set; }
Property Value
Type | Description |
---|---|
System.Double | The default value of Spacing is 4. |
Examples
The below examples shows, how to set Spacing property of TreeMapLevel in the SfTreeMap.
<treemap:SfTreeMap x:Name="treeMap"
PrimaryValuePath="EmployeesCount"
DataSource="{Binding EmployeeDetails}">
<treemap:SfTreeMap.BindingContext>
<local:EmployeeViewModel />
</treemap:SfTreeMap.BindingContext>
<treemap:SfTreeMap.Levels>
<treemap:TreeMapLevel GroupPath="Country"
Stroke="Gray"
Spacing="1"/>
</treemap:SfTreeMap.Levels>
<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>
See Also
Stroke
Gets or sets the stroke color for the tree map header items 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("#CAC4D0")). |
Examples
The below examples shows, how to set Stroke property of TreeMapLevel in the SfTreeMap.
<treemap:SfTreeMap x:Name="treeMap"
PrimaryValuePath="EmployeesCount"
DataSource="{Binding EmployeeDetails}">
<treemap:SfTreeMap.BindingContext>
<local:EmployeeViewModel />
</treemap:SfTreeMap.BindingContext>
<treemap:SfTreeMap.Levels>
<treemap:TreeMapLevel GroupPath="Country"
Stroke="Gray"/>
</treemap:SfTreeMap.Levels>
<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>
See Also
StrokeWidth
Gets or sets the width of the stroke for the tree map header items in the SfTreeMap.
Declaration
public double StrokeWidth { get; set; }
Property Value
Type | Description |
---|---|
System.Double | The default value of StrokeWidth is 1. |
Examples
The below examples shows, how to set StrokeWidth property of TreeMapLevel in the SfTreeMap.
<treemap:SfTreeMap x:Name="treeMap"
PrimaryValuePath="EmployeesCount"
DataSource="{Binding EmployeeDetails}">
<treemap:SfTreeMap.BindingContext>
<local:EmployeeViewModel />
</treemap:SfTreeMap.BindingContext>
<treemap:SfTreeMap.Levels>
<treemap:TreeMapLevel GroupPath="Country"
Stroke="Gray"
StrokeWidth="1"/>
</treemap:SfTreeMap.Levels>
<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>
See Also
TextStyle
Gets or sets the style of header item 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 Color.FromArgb("#49454F"), FontSize is 11, FontFamily is null, FontAttributes is Microsoft.Maui.Controls.FontAttributes.None |
Examples
The below examples shows, how to set TextStyle property of TreeMapLevel in the SfTreeMap.
<treemap:SfTreeMap x:Name="treeMap"
PrimaryValuePath="EmployeesCount"
DataSource="{Binding EmployeeDetails}">
<treemap:SfTreeMap.BindingContext>
<local:EmployeeViewModel />
</treemap:SfTreeMap.BindingContext>
<treemap:SfTreeMap.Levels>
<treemap:TreeMapLevel GroupPath="Country"
Stroke="Gray">
<treemap:TreeMapLevel.TextStyle>
<treemap:TreeMapTextStyle TextColor="Red"/>
</treemap:TreeMapLevel.TextStyle>
</treemap:TreeMapLevel>
</treemap:SfTreeMap.Levels>
<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>
See Also
Methods
OnBindingContextChanged()
Invokes on the binding context of the view changed.
Declaration
protected override void OnBindingContextChanged()