Skip to content

MenuItemMarkupExtensions.CommandData method

Sets CommandData. The value this placement hands its command as the invocation argument, so several items can share one command and differ only in what they pass. Null lets the argument the menu captured when it opened (the item it opened over) stand in.

public static MenuItem CommandData(this MenuItem target, object? value)
parameter description
target Target MenuItem.
value Value assigned to CommandData.

The same element for chaining.

Sets: MenuItem.CommandData