WizardGroup.RegisterPage(Type, String, String, String, Image) Method
Registers a user control as a new page within the Wizard page collection.
Namespace: DevExpress.XtraCharts.Wizard
Assembly: DevExpress.XtraCharts.v20.1.Wizard.dll
NuGet Package: DevExpress.Win.Charts
Declaration
public WizardPage RegisterPage(
Type pageType,
string label,
string header,
string description,
Image image
)
Parameters
Name | Type | Description |
---|---|---|
pageType | Type | A Type class instance, specifying the user-defined type of a control, used as a page. |
label | String | A String, specifying the text of a page’s label at the Wizard’s sidebar. |
header | String | A String, specifying the text of a page’s header. |
description | String | A String, specifying the text of a page’s description, placed in the top section of a page. |
image | Image | A Image class object representing a picture displayed in the ChartWizard sidebar. |
Returns
Type | Description |
---|---|
WizardPage | A new WizardPage class instance, representing a user-defined page. |
Remarks
Use this method to register a user-defined page in the ChartWizard.
Example
The following example demonstrates how to add a new group with a new page to the Chart Wizard at runtime.
First, create a control that becomes a page’s content. Create a new control that inherits from the WizardControlBase and drop the ChartControl onto it. This follows because the page is intended to customize the chart. The page should contain a chart control to display the changes as the settings are modified.
Then, use the following code to create a group and a page. You can handle the WizardPage.InitializePage event to get access to the contained chart control.
using DevExpress.XtraCharts.Wizard;
//...
private void ShowNewWizard() {
// Create a Wizard instance.
ChartWizard wiz = new ChartWizard(this.chartControl1);
// Create a new group.
WizardGroup MyWizardGroup = wiz.RegisterGroup("NewGroup");
// Create a new page with a "MyPage" name, "MyHeader" as a caption, "MyDesription"
// as a description, without image. It contains the UserControl1.
WizardPage MyWizardPage = MyWizardGroup.RegisterPage(typeof(UserControl1),
"MyPage", "MyHeader", "MyDesription", null);
// Subscribe to the InitializePage event.
MyWizardPage.InitializePage += new InitializePageEventHandler (MyWizardPage_InitializePage);
// Invoke the Wizard.
wiz.ShowDialog();
}
void MyWizardPage_InitializePage(object sender, InitializePageEventArgs e) {
e.Chart = ((UserControl1)e.Control).chartControl1;
}
Related GitHub Examples
The following code snippet (auto-collected from DevExpress Examples) contains a reference to the RegisterPage(Type, String, String, String, Image) 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.