wpf-devexpress-dot-xpf-dot-propertygrid-dot-collectionbuttonbaseeventargs.md
Gets the collection button‘s type.
Namespace : DevExpress.Xpf.PropertyGrid
Assembly : DevExpress.Xpf.PropertyGrid.v25.2.dll
NuGet Package : DevExpress.Wpf.PropertyGrid
public CollectionButtonKind ButtonKind { get; }
Public ReadOnly Property ButtonKind As CollectionButtonKind
| Type | Description |
|---|---|
| CollectionButtonKind |
The collection button’s type.
|
Available values:
| Name | Description |
|---|---|
| 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
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
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