Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

BaseLayoutItem.CaptionFormat Property

Gets or sets the format string used to format the layout item’s caption. This is a dependency property.

Namespace: DevExpress.Xpf.Docking

Assembly: DevExpress.Xpf.Docking.v24.2.dll

NuGet Package: DevExpress.Wpf.Docking

#Declaration

public string CaptionFormat { get; set; }

#Property Value

Type Description
String

A string that specifies the caption format.

#Remarks

The format specified by the CaptionFormat property must follow the Composite Formatting rules. Typically, the format string contains the “{0}” string plus custom text. The “{0}” string is a placeholder for the item’s caption, specified by the BaseLayoutItem.Caption property. To learn more about formatting, see Composite Formatting in MSDN.

The following code shows how to create a format string that adds a colon after an item’s caption:

myLayoutItem.CaptionFormat = "{0}:";
See Also