Skip to main content
A newer version of this page is available. .

TreeMapLayoutAlgorithmBase.Direction Property

Gets or sets the layout fill direction used by the algorithm.

Namespace: DevExpress.XtraTreeMap

Assembly: DevExpress.XtraTreeMap.v20.2.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.

View Example

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());
        }
    }
}

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the Direction property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also