Back to Devexpress

NavigationPageBase.ControlTypeName Property

windowsforms-devexpress-dot-xtrabars-dot-navigation-dot-navigationpagebase-3c7393fd.md

latest2.8 KB
Original Source

NavigationPageBase.ControlTypeName Property

Gets or sets the type name of a control associated with this page.

Namespace : DevExpress.XtraBars.Navigation

Assembly : DevExpress.XtraBars.v25.2.dll

NuGet Package : DevExpress.Win.Navigation

Declaration

csharp
[DefaultValue(null)]
public string ControlTypeName { get; set; }
vb
<DefaultValue(Nothing)>
Public Property ControlTypeName As String

Property Value

TypeDefaultDescription
Stringnull

A String value that is the type name of a control associated with this page.

|

Remarks

You can associate a pre-customized page with a desired control by utilizing the NavigationPageBase.ControlName and ControlTypeName properties. The first property specifies the name of the associated control, while the second one is the full control type name (includes the project and folders names).

csharp
navigationPage1.ControlName = "ucFramePage1";
navigationPage1.ControlTypeName = "SampleApp1.UserControls.ucFramePage1";
navigationPage2.ControlName = "ucFramePage2";
navigationPage2.ControlTypeName = "SampleApp1.UserControls.ucFramePage2";
vb
navigationPage1.ControlName = "ucFramePage1"
navigationPage1.ControlTypeName = "SampleApp1.UserControls.ucFramePage1"
navigationPage2.ControlName = "ucFramePage2"
navigationPage2.ControlTypeName = "SampleApp1.UserControls.ucFramePage2"

On the form load event, call the NavigationFrame.AddPage method to supply navigation pages with their associated controls.

csharp
navigationFrame1.AddPage(new ucFramePage1());
navigationFrame1.AddPage(new ucFramePage2());
vb
navigationFrame1.AddPage(New ucFramePage1())
navigationFrame1.AddPage(New ucFramePage2())

See Also

NavigationPageBase Class

NavigationPageBase Members

DevExpress.XtraBars.Navigation Namespace