TreeMapLayoutAlgorithmBase.Direction Property
Gets or sets the layout fill direction used by the algorithm.
Namespace: DevExpress.XtraTreeMap
Assembly: DevExpress.XtraTreeMap.v24.1.dll
NuGet Package: DevExpress.TreeMap
Declaration
[DefaultValue(TreeMapLayoutDirection.TopLeftToBottomRight)]
[XtraSerializableProperty]
public TreeMapLayoutDirection Direction { get; set; }
Property Value
Type | Default | Description |
---|---|---|
TreeMapLayoutDirection | TopLeftToBottomRight | A LayoutDirection enumeration value. |
Available values:
Name | Description |
---|---|
TopLeftToBottomRight | Items are arranged from the top-left angle to the bottom-right corner. |
BottomLeftToTopRight | Items are arranged from the bottom-left angle to the top-right corner. |
TopRightToBottomLeft | Items are arranged from the top-right angle to the bottom-left corner. |
BottomRightToTopLeft | Items are arranged from the bottom-right angle to the top-left corner. |
Remarks
For instance, for the LayoutDirection.TopLeftToBottomRight value, the largest tree map item will be arranged at the top left corner and the smallest item will be placed at the bottom right corner.
Example
To change the layout algorithm used by TreeMapControl, specify the TreeMapControl.LayoutAlgorithm property. For all default algorithms, you can configure the fill direction using the TreeMapLayoutAlgorithmBase.Direction
.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace LayoutAlgorithmCustomization {
static class Program {
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main() {
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new Form1());
}
}
}