Back to Devexpress

ChartControl.BeginInit() Method

windowsforms-devexpress-dot-xtracharts-dot-chartcontrol-cbc54392.md

latest2.9 KB
Original Source

ChartControl.BeginInit() Method

Starts the ChartControl initialization.

Namespace : DevExpress.XtraCharts

Assembly : DevExpress.XtraCharts.v25.2.UI.dll

NuGet Package : DevExpress.Win.Charts

Declaration

csharp
public void BeginInit()
vb
Public Sub BeginInit

Remarks

To finish the control initialization, use the ChartControl.EndInit method. Call the BeginInit and EndInit methods to prevent the chart layout’s recalculation until the initialization is complete.

Note

The BeginInit method prevents any validation until the ChartControl.EndInit method is called.

The chart’s layout is recalculated in the following cases:

  • A chart is being rendered

  • When you use the following properties:

  • When you call the following methods:

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the BeginInit() 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-create-custom-legend-radio-buttons-to-control-visibility-of-a-chart-series/CS/MainForm.cs#L16

csharp
InitializeComponent();
chartControl.BeginInit(); {
    chartControl.LegendItemChecked += OnLegendItemChecked;

winforms-chart-create-custom-legend-radio-buttons-to-control-visibility-of-a-chart-series/VB/MainForm.vb#L22

vb
InitializeComponent()
chartControl.BeginInit()
If True Then

See Also

EndInit()

ChartControl Class

ChartControl Members

DevExpress.XtraCharts Namespace