Gets or sets a value indicating how the background image is positioned, relatively either to the control's window or to the scrollable document area.
Namespace: MindFusion.Diagramming.Wpf
Assembly: MindFusion.Diagramming.Wpf
C# Copy Code |
---|
public ImageAlign BackgroundImageAlign { get; set; } |
Visual Basic Copy Code |
---|
Public Property BackgroundImageAlign As ImageAlign |
A member of the ImageAlign enumeration. The default is ImageAlign.Document.
The background image can be aligned to a corner, stretched, centered, or tiled to cover the control's area.
To have a background image stretched along the drawing surface, use code like the following:
C# Copy Code |
---|
Uri uri = new Uri(@"IMG0314.jpg"); diagram.BackgroundImage = new BitmapImage(uri); diagram.BackgroundImageAlign = ImageAlign.Stretch; |
Visual Basic Copy Code |
---|
Dim uri As Uri = New Uri("IMM0314.jpg") diagram.BackgroundImage = New BitmapImage(uri) diagram.BackgroundImageAlign = ImageAlign.Stretch |
WpfDiagram Programmer's Guide | © 2024 MindFusion |