Back to Devexpress

DXImageExtension Class

wpf-devexpress-dot-xpf-dot-core-16455fc9.md

latest5.2 KB
Original Source

DXImageExtension Class

Allows you to use .png / .svg images from the DevExpress.Images.v25.2 assembly as an ImageSource.

Namespace : DevExpress.Xpf.Core

Assembly : DevExpress.Xpf.Core.v25.2.dll

NuGet Package : DevExpress.Wpf.Core

Declaration

csharp
public class DXImageExtension :
    DXImageExtensionBase
vb
Public Class DXImageExtension
    Inherits DXImageExtensionBase

Remarks

Use the DevExpress Image Picker tool to see images included in the DevExpress.Images.v25.2 assembly and copy their paths/names to the clipboard.

The following code sample uses Image controls to display images from the DevExpress.Images.v25.2 assembly:

xaml
<Window ...
    xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core">
    <Grid>
        <Image Source="{dx:DXImage 'Images/Actions/Close_32x32.png'}" Height="32"/>
        <Image Source="{dx:DXImage 'SvgImages/Align/AlignHorizontalCenter.svg'}" Height="32"/>
        <Image Source="{dx:DXImage Image='Apply_32x32.png'}" Height="32"/>
    </Grid>
</Window>

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

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.

wpf-data-grid-implement-crud-operations/CS/CodeBehind/EFCore/LocalData/MainWindow.xaml#L15

xml
<dxb:BarButtonItem Content="Refresh (F5)" Command="{Binding View.Commands.RefreshDataSource, ElementName=grid}"
                   Glyph="{dx:DXImage SvgImages/Icon Builder/Actions_Refresh.svg}" BarItemDisplayMode="ContentAndGlyph" />
<dxb:BarButtonItem Content="Edit (F2)" Command="{Binding View.Commands.EditFocusedRow, ElementName=grid}"

wpf-docklayoutmanager-merge-ribbon-controls/CS/WpfApplication1/MainWindow.xaml#L12

xml
<dxr:RibbonPageGroup Caption="File">
    <dxb:BarButtonItem x:Name="biNew" Content="New" LargeGlyph="{dx:DXImage Image=New_32x32.png}"/>
    <dxb:BarButtonItem x:Name="biOpen" Content="Open" Glyph="{dx:DXImage Image=Open_16x16.png}"/>

wpf-create-a-ribboncontrol/CS/RibbonControl_Ex/MainWindow.xaml#L11

xml
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
Icon="{dxc:DXImage Image=Home_16x16.png}"
>

wpf-data-grid-extend-crud-operations/CS/AsyncCRUDOperations/MainWindow.xaml#L15

xml
<dxb:ToolBarControl>
    <dxb:BarButtonItem Content="Refresh (F5)" Command="{Binding View.Commands.RefreshDataSource, ElementName=grid}" Glyph="{dx:DXImage SvgImages/Icon Builder/Actions_Refresh.svg}" BarItemDisplayMode="ContentAndGlyph" />
    <dxb:BarButtonItem Content="Edit (F2)" Command="{Binding View.Commands.EditFocusedRow, ElementName=grid}" Glyph="{dx:DXImage SvgImages/Icon Builder/Actions_Edit.svg}" BarItemDisplayMode="ContentAndGlyph" />

wpf-create-a-fluent-design-using-appearance-options/CS/FluentDesignTemplate/ViewResourceDictionary.xaml#L10

xml
<dxmvvm:ObjectToObjectConverter x:Key="eventTypeToImageConverter">
    <dxmvvm:MapItem Source="Meeting" Target="{dx:DXImage 'SvgImages/XAF/Action_Translate.svg'}"/>
    <dxmvvm:MapItem Source="Celebration" Target="{dx:DXImage 'SvgImages/Business Objects/BO_Role.svg'}"/>

Inheritance

Object MarkupExtension DevExpress.Xpf.DXBinding.DXMarkupExtensionBase DevExpress.Xpf.Core.DXImageExtensionBase DXImageExtension

See Also

DXImageExtension Members

DevExpress.Xpf.Core Namespace