Skip to main content

SplitString Class

A string that consists of two parts split by a separator.

Namespace: DevExpress.ExpressApp.Utils

Assembly: DevExpress.ExpressApp.v26.1.dll

NuGet Package: DevExpress.ExpressApp

Declaration

public class SplitString

Remarks

XAF uses instances of the SplitString class to define Window captions. The following property values are concatenated to generate a caption:

If FirstPart or SecondPart is empty or undefined, XAF omits the Separator.

You can use the Text property to specify the complete caption. When Text is specified, XAF ignores FirstPart, Separator, and SecondPart.

The following code snippet specifies a custom caption without a separator in the main window of an XAF application:

using DevExpress.ExpressApp;
using DevExpress.ExpressApp.SystemModule;

public class CustomizeWindowCaptionViewController : WindowController {
    private WindowTemplateController captionController;

    protected override void OnActivated() {
        base.OnActivated();
        captionController = Frame.GetController<WindowTemplateController>();
        captionController?.CustomizeWindowCaption += captionController_CustomizeWindowCaption;
    }

    private void captionController_CustomizeWindowCaption(object sender, CustomizeWindowCaptionEventArgs e) {
        e.WindowCaption.Text = "My Custom Caption";
    }

    protected override void OnDeactivated() {
        captionController?.CustomizeWindowCaption -= captionController_CustomizeWindowCaption;
        base.OnDeactivated();
    }
}

For additional information about window captions, refer to the following topics:

Inheritance

Object
SplitString
See Also