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

DiagramControl.DiagramPageBackgroundTemplate Property

Gets or sets the template that specifies the background of a page. This is a dependency property.

Namespace: DevExpress.Xpf.Diagram

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

NuGet Package: DevExpress.Wpf.Diagram

#Declaration

public DataTemplate DiagramPageBackgroundTemplate { get; set; }

#Property Value

Type Description
DataTemplate

A DataTemplate object that specifies the background of a page.

#Remarks

Use the DiagramPageBackgroundTemplate property to display a custom page background.

The following example demonstrates a DiagramControl that displays an image in the center of each page.

DiagramPageBackgroundTemplate

<dxdiag:DiagramDesignerControl>
    <dxdiag:DiagramDesignerControl.DiagramPageBackgroundTemplate>
        <DataTemplate>
            <Image Source="DevExpress-Logo.png" HorizontalAlignment="Center"
                   VerticalAlignment="Center" Stretch="None" Opacity="0.8"/>
        </DataTemplate>
    </dxdiag:DiagramDesignerControl.DiagramPageBackgroundTemplate>
</dxdiag:DiagramDesignerControl>

Note

To specify a custom printed page background, use the DiagramControl.PrintPageBackgroundTemplate property.

See Also