下面的示例演示了在运行时刻如何隐藏 图表向导 的页面上的某个属性标签页。 这种技术用于防止最终用户修改特定的图表设置。

C#CopyCode image复制代码
using DevExpress.XtraCharts.Wizard;
// ...

private void button1_Click(object sender, EventArgs e) {
    // Create a new Wizard.
    ChartWizard wizard = new ChartWizard(this.chartControl1);

    // Obtain a Data page.
    WizardDataPage page = wizard.DataPage;

    // Hide the tabs related to a data source on the Data page.
    page.HiddenPageTabs.Add(DataPageTab.AutoCreatedSeries);
    page.HiddenPageTabs.Add(DataPageTab.SeriesBinding);

    // Invoke the Wizard window.
    wizard.ShowDialog();
}
Visual BasicCopyCode image复制代码
Imports DevExpress.XtraCharts.Wizard;
' ...

Private Sub button1_Click(ByVal sender As Object, ByVal e As EventArgs) _
Handles button1.Click
    ' Create a new Wizard.
    Dim wizard As New ChartWizard(Me.chartControl1)

    ' Obtain a Data page.
    Dim page As WizardDataPage = wizard.DataPage

    ' Hide the tabs related to a data source on the Data page.
    page.HiddenPageTabs.Add(DataPageTab.AutoCreatedSeries)
    page.HiddenPageTabs.Add(DataPageTab.SeriesBinding)

    ' Invoke the Wizard window.
    wizard.ShowDialog()
End Sub

CodeCentralShow Me

在 DevExpress Code Central 数据库中可以找到完整的示例项目,网址是 http://www.devexpress.com/example=E212。 取决于目标平台类型 (ASP.NET、WinForms 等),可以在线运行本示例,或者下载自动可执行的示例。

Expand image参阅