Skip to main content
A newer version of this page is available. .

BaseLayoutItem.CaptionImage Property

Gets or sets the image displayed within the item’s caption. This is a dependency property.

Namespace: DevExpress.Xpf.Docking

Assembly: DevExpress.Xpf.Docking.v18.2.dll

Declaration

public ImageSource CaptionImage { get; set; }

Property Value

Type Description
ImageSource

An ImageSource object that specifies the image displayed within the item’s caption.

Example

This example demonstrates how to use raster and vector icons in dock panel headers.

The vector icon is defined in XAML resources.

<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:PresentationOptions="http://schemas.microsoft.com/winfx/2006/xaml/presentation/options"
                    >
    <DrawingImage x:Key="xamlIcon" PresentationOptions:Freeze="true">
        <DrawingImage.Drawing>
            <GeometryDrawing>
                <GeometryDrawing.Geometry>
                    <GeometryGroup>
                        <EllipseGeometry Center="10,10" RadiusX="9" RadiusY="4" />
                        <EllipseGeometry Center="10,10" RadiusX="4" RadiusY="9" />
                    </GeometryGroup>
                </GeometryDrawing.Geometry>
                <GeometryDrawing.Brush>
                    <LinearGradientBrush>
                        <GradientStop Offset="0.0" Color="Blue" />
                        <GradientStop Offset="1.0" Color="#CCCCFF" />
                    </LinearGradientBrush>
                </GeometryDrawing.Brush>
                <GeometryDrawing.Pen>
                    <Pen Thickness="2" Brush="Black" />
                </GeometryDrawing.Pen>
            </GeometryDrawing>
        </DrawingImage.Drawing>
    </DrawingImage>
</ResourceDictionary>

The following code snippets (auto-collected from DevExpress Examples) contain references to the CaptionImage property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also