Back to Devexpress

PaneSizeMode Enum

corelibraries-devexpress-dot-xtracharts-5d929149.md

latest5.4 KB
Original Source

PaneSizeMode Enum

Lists the values that specify measurement units of a pane’s size mode.

Namespace : DevExpress.XtraCharts

Assembly : DevExpress.XtraCharts.v25.2.dll

NuGet Package : DevExpress.Charts

Declaration

csharp
[ResourceFinder(typeof(XtraChartsResFinder), "PropertyNamesRes")]
public enum PaneSizeMode
vb
<ResourceFinder(GetType(XtraChartsResFinder), "PropertyNamesRes")>
Public Enum PaneSizeMode

Members

NameDescription
UseWeight

A pane’s size is specified by the LayoutDefinition.Weight property and is proportionally recalculated when a chart is resized.

| | UseSizeInPixels |

A pane’s size is specified by the LayoutDefinition.SizeInPixels property (measured in pixels) and is fixed when a chart is resized.

|

The following properties accept/return PaneSizeMode values:

LibraryRelated API Members
Cross-Platform Class LibraryLayoutDefinition.SizeMode
WinForms ControlsLayoutDefinitionModel.SizeMode

Remarks

Values listed by the PaneSizeMode enumeration are used to set the XYDiagramPaneBase.SizeMode property.

For more information, refer to Pane Layout.

Example

This example shows how to arrange chart panes using the grid layout.

Populate the GridPaneLayout.ColumnDefinitions and GridPaneLayout.RowDefinitions collections with LayoutDefinition objects.

Use the LayoutDefinition.Weight or LayoutDefinition.SizeInPixels properties to specify the layout item’s size. Note that you should specify the LayoutDefinition.SizeMode property to define which size property is used.

Use the XYDiagramPaneBase.LayoutOptions property to access the pane layout options. Define the GridLayoutOptions.Column, GridLayoutOptions.ColumnSpan, GridLayoutOptions.Row and GridLayoutOptions.RowSpan properties to specify a pane position.

csharp
XYDiagram diagram = chart.Diagram as XYDiagram;
diagram.PaneLayout.AutoLayoutMode = PaneAutoLayoutMode.Grid;
// You can use the AddRange method to add several layout definitions to the collection.
diagram.PaneLayout.ColumnDefinitions.Add(new LayoutDefinition { SizeMode = PaneSizeMode.UseWeight, Weight = 1 });
diagram.PaneLayout.ColumnDefinitions.Add(new LayoutDefinition { SizeMode = PaneSizeMode.UseSizeInPixels, SizeInPixels = 200 });
diagram.PaneLayout.RowDefinitions.Add(new LayoutDefinition());
diagram.PaneLayout.RowDefinitions.Add(new LayoutDefinition());

diagram.DefaultPane.LayoutOptions.Column = 0;
diagram.DefaultPane.LayoutOptions.Row = 0;

diagram.Panes[0].LayoutOptions.Column = 1;
diagram.Panes[0].LayoutOptions.Row = 0;
diagram.Panes[0].LayoutOptions.RowSpan = 2;
diagram.Panes[0].LayoutOptions.ColumnSpan = 1;

diagram.Panes[1].LayoutOptions.Column = 0;
diagram.Panes[1].LayoutOptions.Row = 1;
vb
Dim diagram As XYDiagram = CType(chart.Diagram,XYDiagram)
diagram.PaneLayout.AutoLayoutMode = PaneAutoLayoutMode.Grid
' You can use the AddRange method to add several layout definitions to the collection.
diagram.PaneLayout.ColumnDefinitions.Add(New LayoutDefinition() {SizeMode=PaneSizeMode.UseWeight, Weight=1})
diagram.PaneLayout.ColumnDefinitions.Add(New LayoutDefinition() {SizeMode = PaneSizeMode.UseSizeInPixels, SizeInPixels = 200})
diagram.PaneLayout.RowDefinitions.Add(New LayoutDefinition)
diagram.PaneLayout.RowDefinitions.Add(New LayoutDefinition)

diagram.DefaultPane.LayoutOptions.Column = 0
diagram.DefaultPane.LayoutOptions.Row = 0

diagram.Panes(0).LayoutOptions.Column = 1
diagram.Panes(0).LayoutOptions.Row = 0
diagram.Panes(0).LayoutOptions.RowSpan = 2
diagram.Panes(0).LayoutOptions.ColumnSpan = 1

diagram.Panes(1).LayoutOptions.Column = 0
diagram.Panes(1).LayoutOptions.Row = 1

See Also

Panes

How to: Create a Multi-Pane Chart

DevExpress.XtraCharts Namespace