Skip to content

ContextMenuMarkupExtensions class

Generated fluent setters and event subscriptions for ContextMenu.

Guide: C# Markup guide

public static class ContextMenuMarkupExtensions
name description
static ItemHeight(…) Sets the height of menu items.
static ItemPadding(…) Sets the padding around menu items.
static MaxMenuHeight(…) Sets an upper bound on the menu height; the default is no bound.
static Placement(…) Sets where the menu opens relative to its placement target.
static PlacementOffset(…) Sets a DIP offset applied to the placement, mirrored on the flipped side.
static SystemBackdrop(…) Sets the material behind the menu; submenus opened from it follow. A menu in its own window gets the platform’s material, and a menu drawn inside its owner’s surface the same look from what that surface holds. Where neither can be shown, BackdropFallbackBrush is drawn under the background.