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.v24.2.dll
NuGet Package: DevExpress.Wpf.Docking
Declaration
Property Value
Type | Description |
---|---|
ImageSource | An ImageSource object that specifies the image displayed within the item’s Caption. |
Remarks
You can use the BaseLayoutItem.ShowCaptionImage property to specify whether an image specified in the CaptionImage property is displayed.
The following code sample adds the Error icon to the Error List LayoutPanel.
<Window ...
xmlns:PresentationOptions="http://schemas.microsoft.com/winfx/2006/xaml/presentation/options"
xmlns:dxdo="http://schemas.devexpress.com/winfx/2008/xaml/docking">
<Window.Resources>
<ResourceDictionary>
<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 Brush="Black" Thickness="2" />
</GeometryDrawing.Pen>
</GeometryDrawing>
</DrawingImage.Drawing>
</DrawingImage>
</ResourceDictionary>
</Window.Resources>
<dxdo:DockLayoutManager>
<dxdo:LayoutGroup>
<dxdo:TabbedGroup>
<dxdo:LayoutPanel Caption="Error List" CaptionImage="{dx:DXImage Image=Error_16x16.png}"/>
<dxdo:LayoutPanel Caption="Output" CaptionImage="{StaticResource xamlIcon}" />
<!-- ... -->
</dxdo:TabbedGroup>
</dxdo:LayoutGroup>
</dxdo:DockLayoutManager>
</Window>
Related GitHub Examples
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.