Back to Devexpress

CollectionButtonBaseEventArgs.ButtonKind Property

wpf-devexpress-dot-xpf-dot-propertygrid-dot-collectionbuttonbaseeventargs.md

latest3.0 KB
Original Source

CollectionButtonBaseEventArgs.ButtonKind Property

Gets the collection button‘s type.

Namespace : DevExpress.Xpf.PropertyGrid

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

NuGet Package : DevExpress.Wpf.PropertyGrid

Declaration

csharp
public CollectionButtonKind ButtonKind { get; }
vb
Public ReadOnly Property ButtonKind As CollectionButtonKind

Property Value

TypeDescription
CollectionButtonKind

The collection button’s type.

|

Available values:

NameDescription
Add

This button adds a new item to the collection.

| | Remove |

This button removes the item from the collection.

|

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the ButtonKind 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.

wpf-property-grid-specify-custom-collection-edit-actions/CS/MainWindow.xaml.cs#L23

csharp
void OnCollectionButtonsVisibility(object sender, CollectionButtonsVisibilityEventArgs e) {
    if (e.ButtonKind == CollectionButtonKind.Remove) {
        var issueView = propertyGrid.SelectedObject as IssueView;

wpf-property-grid-specify-custom-collection-edit-actions/VB/MainWindow.xaml.vb#L17

vb
Private Sub OnCollectionButtonsVisibility(ByVal sender As Object, ByVal e As CollectionButtonsVisibilityEventArgs)
    If e.ButtonKind = CollectionButtonKind.Remove Then
        Dim issueView = TryCast(Me.propertyGrid.SelectedObject, IssueView)

See Also

CollectionButtonBaseEventArgs Class

CollectionButtonBaseEventArgs Members

DevExpress.Xpf.PropertyGrid Namespace