Back to Devexpress

View.Caption Property

expressappframework-devexpress-dot-expressapp-dot-view-fb4bb703.md

latest4.7 KB
Original Source

View.Caption Property

Specifies a View‘s caption.

Namespace : DevExpress.ExpressApp

Assembly : DevExpress.ExpressApp.v25.2.dll

NuGet Package : DevExpress.ExpressApp

Declaration

csharp
public virtual string Caption { get; set; }
vb
Public Overridable Property Caption As String

Property Value

TypeDescription
String

A string value representing the current View’s caption.

|

Remarks

A View’s caption is included in the caption of the Window which contains this View.

By default, this property is set to the value of the Caption attribute from the Application Model node specified by the View.Model property.

When setting a value to this property, the View.CaptionChanged event is raised.

The following code snippets (auto-collected from DevExpress Examples) contain references to the Caption property.

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.

xaf-how-to-save-the-currently-opened-view-as-a-new-view-variant-at-runtime/CS/EF/ViewVariantSaveEF/ViewVariantSaveEF.Module/Controllers/UserViewVariantsController.cs#L107

csharp
if (mode == STR_NewViewVariant_Id) {
    parameter.Caption = string.Format("{0}_{1:g}", View.Caption, DateTime.Now);
    viewCaption = CaptionHelper.GetLocalizedText("Texts", "NewViewVariantParameterCaption");

xaf-how-to-create-information-panels/CS/InfoPanels.Module.Win/Controllers/InfoPanelViewControllerWin.cs#L39

csharp
void UpdateControls() {
    label.Text = "The current View is " + View.Caption;
    if (View.CurrentObject != null) {

XAF_how-to-show-filter-dialog-before-listview/CS/EFCore/DialogBeforeListViewEF/DialogBeforeListViewEF.Module/Controllers/ShowFilterDialogController.cs#L40

csharp
DetailView filterDetailView = Application.CreateDetailView(nonPersistentObjectSpace, newViewFilterContainer);
filterDetailView.Caption = string.Format("Filter for the {0} ListView", View.Caption);
Application.ShowViewStrategy.ShowViewInPopupWindow(filterDetailView, () => FilterDetailView_OK(filterDetailView));

xaf-how-to-create-information-panels/VB/InfoPanels.Module.Win/Controllers/InfoPanelViewControllerWin.vb#L38

vb
Private Overloads Sub UpdateControls()
    label.Text = "The current View is " & View.Caption
    If View.CurrentObject IsNot Nothing Then

See Also

How the XAF Application Model Works

Model Editor

Caption

View Class

View Members

DevExpress.ExpressApp Namespace