ContextMenu.PlacementRectangle Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets or sets the area relative to which the context menu is positioned when it opens.
public:
property System::Windows::Rect PlacementRectangle { System::Windows::Rect get(); void set(System::Windows::Rect value); };
[System.ComponentModel.Bindable(true)]
public System.Windows.Rect PlacementRectangle { get; set; }
[<System.ComponentModel.Bindable(true)>]
member this.PlacementRectangle : System.Windows.Rect with get, set
Public Property PlacementRectangle As Rect
Property Value
The area that defines the rectangle that is used to position the context menu. The default is Empty.
- Attributes
Examples
The following example shows how to use the PlacementRectangle property and specify where the ContextMenu is placed.
<ContextMenu Placement="Bottom" PlacementRectangle="30,50,0,0">
Remarks
You can position a ContextMenu by setting the PlacementTarget, PlacementRectangle, Placement, HorizontalOffset, and VerticalOffsetProperty properties. These properties behave the same as they do for a Popup. For more information, see Popup Placement Behavior.
Dependency Property Information
Identifier field | PlacementRectangleProperty |
Metadata properties set to true |
None |
Applies to
See also
Povratne informacije
https://aka.ms/ContentUserFeedback.
Stiže uskoro: Tijekom 2024. postupno ćemo ukinuti servis Problemi sa servisom GitHub kao mehanizam za povratne informacije za sadržaj i zamijeniti ga novim sustavom za povratne informacije. Dodatne informacije potražite u članku:Pošaljite i pogledajte povratne informacije za