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

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.v24.2.dll

NuGet Package: DevExpress.Wpf.Controls

#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