Back to Devexpress

XYDiagramPaneCollection.GetPaneByName(String) Method

corelibraries-devexpress-dot-xtracharts-dot-xydiagrampanecollection-dot-getpanebyname-x28-system-dot-string-x29.md

latest3.1 KB
Original Source

XYDiagramPaneCollection.GetPaneByName(String) Method

Gets a pane within the collection by its name.

Namespace : DevExpress.XtraCharts

Assembly : DevExpress.XtraCharts.v25.2.dll

NuGet Package : DevExpress.Charts

Declaration

csharp
public XYDiagramPane GetPaneByName(
    string name
)
vb
Public Function GetPaneByName(
    name As String
) As XYDiagramPane

Parameters

NameTypeDescription
nameString

A String which specifies the name of the pane to find.

|

Returns

TypeDescription
XYDiagramPane

An XYDiagramPane object that represents the pane with the specified name.

|

Remarks

Note that this method finds only the first occurrence of a pane with the specified name. If no element with the specified name is found, then this method returns null ( Nothing in Visual Basic).

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the GetPaneByName(String) method.

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.

winforms-chart-add-an-additional-legend-to-a-chart/CS/LegendsSamples/Form1.cs#L37

csharp
// Position it.
macdLegend.DockTarget = diagram.Panes.GetPaneByName("macdPane");
macdLegend.AlignmentHorizontal = LegendAlignmentHorizontal.Left;

winforms-chart-add-an-additional-legend-to-a-chart/VB/LegendsSamples/Form1.vb#L39

vb
' Position it.
macdLegend.DockTarget = diagram.Panes.GetPaneByName("macdPane")
macdLegend.AlignmentHorizontal = LegendAlignmentHorizontal.Left

See Also

XYDiagramPaneCollection Class

XYDiagramPaneCollection Members

DevExpress.XtraCharts Namespace