windowsforms-devexpress-dot-xtracharts-dot-chartcontrol-43131ccb.md
Creates a copy of the current ChartControl object.
Namespace : DevExpress.XtraCharts
Assembly : DevExpress.XtraCharts.v25.2.UI.dll
NuGet Package : DevExpress.Win.Charts
public object Clone()
Public Function Clone As Object
| Type | Description |
|---|---|
| Object |
A ChartControl object which is a copy of the current object.
|
This method creates a new instance of the ChartControl class and copies all the values of the current ChartControl‘s properties to it.
The following code snippet (auto-collected from DevExpress Examples) contains a reference to the Clone() 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-charts-show-chart-legend-with-markers-in-separate-control/CS/Form1.cs#L23
{
using (ChartControl fakeChart = (ChartControl)sourceChart.Clone())
{
winforms-charts-show-chart-legend-with-markers-in-separate-control/VB/Form1.vb#L23
Private Sub CreateLegendMarkers(ByVal sourceChart As ChartControl)
Using fakeChart As ChartControl = CType(sourceChart.Clone(), ChartControl)
fakeChart.Legend.Visibility = DevExpress.Utils.DefaultBoolean.True
See Also