Skip to main content

WinUIDialogWindow.ContentStyle Property

Gets or sets a style applied to the dialog content. This is a dependency property.

Namespace: DevExpress.Xpf.WindowsUI

Assembly: DevExpress.Xpf.Controls.v21.2.dll

Declaration

public Style ContentStyle { get; set; }

Property Value

Type Description
Style

A Style object that represents the dialog content style.

Remarks

Target Type: FrameworkElement.

The WinUIDialogWindow dialog window allows you to customize its content. To do this, pass a custom Style object to the ContentStyle property.

The code sample below shows how to stretch the dialog content.

<dxwinui:WinUIDialogService.DialogStyle>
    <Style TargetType="dxwinui:WinUIDialogWindow">
        <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
        <Setter Property="VerticalContentAlignment" Value="Stretch"/>
        <Setter Property="ContentStyle">
            <Setter.Value>
                <Style TargetType="FrameworkElement">
                    <Setter Property="Margin" Value="8"/>
                    <Setter Property="HorizontalAlignment" Value="Stretch"/>
                </Style>
            </Setter.Value>
        </Setter>
    </Style>
</dxwinui:WinUIDialogService.DialogStyle>

See Also