Back to Devexpress

ReportDesignerCommands Class

wpf-devexpress-dot-xpf-dot-reports-dot-userdesigner-9718b4bc.md

latest3.3 KB
Original Source

ReportDesignerCommands Class

Provides access to Report Designer commands.

Namespace : DevExpress.Xpf.Reports.UserDesigner

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

NuGet Package : DevExpress.Wpf.Reporting

Declaration

csharp
public class ReportDesignerCommands :
    BindableBase,
    ICommandScopeAnalyzer
vb
Public Class ReportDesignerCommands
    Inherits BindableBase
    Implements ICommandScopeAnalyzer

The following members return ReportDesignerCommands objects:

Remarks

The Report Designer has various built-in commands allowing you to open, create, save and close report documents as well as perform actions with report elements.

The following code snippet demonstrates how to bind commands in the Report Designer with the example of adding a custom button to the Report Designer toolbar.

xaml
<Window 
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"       
    xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core" 
    xmlns:dxb="http://schemas.devexpress.com/winfx/2008/xaml/bars"
    xmlns:dxrud="http://schemas.devexpress.com/winfx/2008/xaml/reports/userdesigner"
    Title="MainWindow" Height="350" Width="525" Loaded="Window_Loaded">
    <dxrud:ReportDesigner>
        <dxrud:ReportDesigner.RibbonCustomizationActions>
            <dxb:InsertAction ContainerName="{x:Static dxrud:DefaultBarItemNames.ReportGroup}">
                <dxb:InsertAction.Element>
                    <dxb:BarButtonItem LargeGlyph="{dx:DXImage Image=close_32x32.png}" 
                               Glyph="{dx:DXImage Image=close_16x16.png}" Content="Close Document"                             
                               Command="{Binding Path=(dxrud:ReportDesigner.Designer).ActualCommands.CloseDocumentCommand, 
                                  RelativeSource={RelativeSource Self}}"/>
                </dxb:InsertAction.Element>
            </dxb:InsertAction>
        </dxrud:ReportDesigner.RibbonCustomizationActions>
    </dxrud:ReportDesigner>
</Window>

Inheritance

Object BindableBase ReportDesignerCommands

See Also

ReportDesignerCommands Members

RibbonCustomizationActions

DevExpress.Xpf.Reports.UserDesigner Namespace