wpf-devexpress-dot-xpf-dot-spreadsheet-dot-spreadsheetcontrol-3917a485.md
Gets or sets the SpreadsheetControl’s command provider. This is a dependency property.
Namespace : DevExpress.Xpf.Spreadsheet
Assembly : DevExpress.Xpf.Spreadsheet.v25.2.dll
NuGet Package : DevExpress.Wpf.Spreadsheet
public CommandProvider CommandProvider { get; set; }
Public Property CommandProvider As CommandProvider
| Type | Description |
|---|---|
| DevExpress.Xpf.Spreadsheet.CommandProvider |
A DevExpress.Xpf.Spreadsheet.CommandProvider object.
|
This class stores commands used by the integrated ribbon and allows you to assign a command to a ribbon item. Use the SpreadsheetControl.Spreadsheet property to access the SpreadsheetControl in binding syntax.
The code snippet below performs the following actions:
<dxsps:SpreadsheetControl.RibbonActions>
<!--Create the Comments group on the Insert tab and add the Comment button to it.-->
<dxb:InsertAction Index="5" ContainerName="{x:Static dxsps:DefaultBarItemNames.RibbonPage_Insert}">
<dxr:RibbonPageGroup Caption="Comments">
<dxb:BarButtonItem Content="Comment" LargeGlyph="{dxsps:SpreadsheetSvgImage Name=InsertComment}"
Command="{Binding RelativeSource={RelativeSource Self}, Path=(dxsps:SpreadsheetControl.Spreadsheet).CommandProvider.InsertComment}"/>
</dxr:RibbonPageGroup>
</dxb:InsertAction>
</dxsps:SpreadsheetControl.RibbonActions>
See Also