Class TreeMapLeafItemSettings
Represents settings for customizing the appearance of leaf items in the SfTreeMap.
Inheritance
Namespace: Syncfusion.Maui.TreeMap
Assembly: Syncfusion.Maui.TreeMap.dll
Syntax
public class TreeMapLeafItemSettings : BindableObject
Constructors
TreeMapLeafItemSettings()
Declaration
public TreeMapLeafItemSettings()
Fields
LabelPathProperty
Identifies the LabelPath dependency property.
Declaration
public static readonly BindableProperty LabelPathProperty
Field Value
Type | Description |
---|---|
Microsoft.Maui.Controls.BindableProperty | The identifier for LabelPath 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. |
TextFormatOptionProperty
Identifies the TextFormatOption dependency property.
Declaration
public static readonly BindableProperty TextFormatOptionProperty
Field Value
Type | Description |
---|---|
Microsoft.Maui.Controls.BindableProperty | The identifier for TextFormatOption 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
LabelPath
Gets or sets the path of the label for the leaf items in the SfTreeMap.
Declaration
public string LabelPath { get; set; }
Property Value
Type | Description |
---|---|
System.String | The default value of LabelPath is System.String.Empty. |
Remarks
This property specifies the path of the label for the leaf items in the TreeMap, the value of this property is used to map to the corresponding property in the DataSource, and the mapped value will be displayed as the text of the leaf items.
Examples
The below examples shows, how to set LabelPath property of TreeMapLeafItemSettings in the SfTreeMap.
<treemap:SfTreeMap x:Name="treeMap"
PrimaryValuePath="EmployeesCount"
DataSource="{Binding EmployeeDetails}">
<treemap:SfTreeMap.BindingContext>
<local:EmployeeViewModel />
</treemap:SfTreeMap.BindingContext>
<treemap:SfTreeMap.LeafItemSettings>
<treemap:TreeMapLeafItemSettings LabelPath="JobDescription">
</treemap:TreeMapLeafItemSettings>
</treemap:SfTreeMap.LeafItemSettings>
<treemap:SfTreeMap.LeafItemBrushSettings>
<treemap:TreeMapUniformBrushSettings Brush="BlueViolet">
</treemap:TreeMapUniformBrushSettings>
</treemap:SfTreeMap.LeafItemBrushSettings>
</treemap:SfTreeMap>
See Also
Spacing
Gets or sets the spacing between the leaf items in the SfTreeMap.
Declaration
public double Spacing { get; set; }
Property Value
Type | Description |
---|---|
System.Double | The default value of Spacing is 1. |
Examples
The below examples shows, how to set Spacing property of TreeMapLeafItemSettings in the SfTreeMap.
<treemap:SfTreeMap x:Name="treeMap"
PrimaryValuePath="EmployeesCount"
DataSource="{Binding EmployeeDetails}">
<treemap:SfTreeMap.BindingContext>
<local:EmployeeViewModel />
</treemap:SfTreeMap.BindingContext>
<treemap:SfTreeMap.LeafItemSettings>
<treemap:TreeMapLeafItemSettings Spacing="1">
</treemap:TreeMapLeafItemSettings>
</treemap:SfTreeMap.LeafItemSettings>
<treemap:SfTreeMap.LeafItemBrushSettings>
<treemap:TreeMapUniformBrushSettings Brush="BlueViolet">
</treemap:TreeMapUniformBrushSettings>
</treemap:SfTreeMap.LeafItemBrushSettings>
</treemap:SfTreeMap>
See Also
Stroke
Gets or sets the stroke color for the leaf items in the SfTreeMap.
Declaration
public Brush Stroke { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.Maui.Controls.Brush | The default value of Stroke is Brush.Transparent. |
Examples
The below examples shows, how to set Stroke property of TreeMapLeafItemSettings in the SfTreeMap.
<treemap:SfTreeMap x:Name="treeMap"
PrimaryValuePath="EmployeesCount"
DataSource="{Binding EmployeeDetails}">
<treemap:SfTreeMap.BindingContext>
<local:EmployeeViewModel />
</treemap:SfTreeMap.BindingContext>
<treemap:SfTreeMap.LeafItemSettings>
<treemap:TreeMapLeafItemSettings Stroke="Red">
</treemap:TreeMapLeafItemSettings>
</treemap:SfTreeMap.LeafItemSettings>
<treemap:SfTreeMap.LeafItemBrushSettings>
<treemap:TreeMapUniformBrushSettings Brush="BlueViolet">
</treemap:TreeMapUniformBrushSettings>
</treemap:SfTreeMap.LeafItemBrushSettings>
</treemap:SfTreeMap>
See Also
StrokeWidth
Gets or sets the width of the stroke for the leaf 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 TreeMapLeafItemSettings in the SfTreeMap.
<treemap:SfTreeMap x:Name="treeMap"
PrimaryValuePath="EmployeesCount"
DataSource="{Binding EmployeeDetails}">
<treemap:SfTreeMap.BindingContext>
<local:EmployeeViewModel />
</treemap:SfTreeMap.BindingContext>
<treemap:SfTreeMap.LeafItemSettings>
<treemap:TreeMapLeafItemSettings StrokeWidth="1">
</treemap:TreeMapLeafItemSettings>
</treemap:SfTreeMap.LeafItemSettings>
<treemap:SfTreeMap.LeafItemBrushSettings>
<treemap:TreeMapUniformBrushSettings Brush="BlueViolet">
</treemap:TreeMapUniformBrushSettings>
</treemap:SfTreeMap.LeafItemBrushSettings>
</treemap:SfTreeMap>
See Also
TextFormatOption
Gets or sets the text format option for the leaf items in the SfTreeMap.
Declaration
public TextFormatOption TextFormatOption { get; set; }
Property Value
Type | Description |
---|---|
TextFormatOption | The default value of TextFormatOption is Trim. |
Remarks
This property will be applicable to only when the LabelPath is specified.
Examples
The below examples shows, how to set TextFormatOption property of TreeMapLeafItemSettings in the SfTreeMap.
<treemap:SfTreeMap x:Name="treeMap"
PrimaryValuePath="EmployeesCount"
DataSource="{Binding EmployeeDetails}">
<treemap:SfTreeMap.BindingContext>
<local:EmployeeViewModel />
</treemap:SfTreeMap.BindingContext>
<treemap:SfTreeMap.LeafItemSettings>
<treemap:TreeMapLeafItemSettings LabelPath="JobDescription"
TextFormatOption="Wrap">
</treemap:TreeMapLeafItemSettings>
</treemap:SfTreeMap.LeafItemSettings>
<treemap:SfTreeMap.LeafItemBrushSettings>
<treemap:TreeMapUniformBrushSettings Brush="BlueViolet">
</treemap:TreeMapUniformBrushSettings>
</treemap:SfTreeMap.LeafItemBrushSettings>
</treemap:SfTreeMap>
See Also
TextStyle
Gets or sets the style of leaf 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("#FFFFFF"), FontSize is 12, FontFamily is null, FontAttributes is Microsoft.Maui.Controls.FontAttributes.None |
Examples
The below examples shows, how to set TextStyle property of TreeMapLeafItemSettings in the SfTreeMap.
<treemap:SfTreeMap x:Name="treeMap"
PrimaryValuePath="EmployeesCount"
DataSource="{Binding EmployeeDetails}">
<treemap:SfTreeMap.BindingContext>
<local:EmployeeViewModel />
</treemap:SfTreeMap.BindingContext>
<treemap:SfTreeMap.LeafItemSettings>
<treemap:TreeMapLeafItemSettings>
<treemap:TreeMapLeafItemSettings.TextStyle>
<treemap:TreeMapTextStyle TextColor="Orange" FontAttributes="Italic" FontSize="12"/>
</treemap:TreeMapLeafItemSettings.TextStyle>
</treemap:TreeMapLeafItemSettings>
</treemap:SfTreeMap.LeafItemSettings>
<treemap:SfTreeMap.LeafItemBrushSettings>
<treemap:TreeMapUniformBrushSettings Brush="BlueViolet">
</treemap:TreeMapUniformBrushSettings>
</treemap:SfTreeMap.LeafItemBrushSettings>
</treemap:SfTreeMap>
See Also
Methods
OnBindingContextChanged()
Invokes on the binding context of the view changed.
Declaration
protected override void OnBindingContextChanged()