Επεξεργασία

Κοινή χρήση μέσω


ContextMenu.CustomPopupPlacementCallback Property

Definition

Gets or sets a callback that indicates where a ContextMenu should be placed on the screen.

public:
 property System::Windows::Controls::Primitives::CustomPopupPlacementCallback ^ CustomPopupPlacementCallback { System::Windows::Controls::Primitives::CustomPopupPlacementCallback ^ get(); void set(System::Windows::Controls::Primitives::CustomPopupPlacementCallback ^ value); };
[System.ComponentModel.Bindable(false)]
public System.Windows.Controls.Primitives.CustomPopupPlacementCallback CustomPopupPlacementCallback { get; set; }
[<System.ComponentModel.Bindable(false)>]
member this.CustomPopupPlacementCallback : System.Windows.Controls.Primitives.CustomPopupPlacementCallback with get, set
Public Property CustomPopupPlacementCallback As CustomPopupPlacementCallback

Property Value

A callback that specifies the location of the ContextMenu.

Attributes

Remarks

The Placement property must be set to Custom for the callback delegate to be used.

The CustomPopupPlacementCallback delegate returns an array of possible points that are defined with respect to the PlacementTarget. When the context menu is displayed, a point is chosen that maximizes the amount of the ToolTip window that is visible.

The behavior is the same as it is for the popup. For more information, see How to: Specify a Custom Popup Position and Popup Placement Sample.

Dependency Property Information

Identifier field CustomPopupPlacementCallbackProperty
Metadata properties set to true None

Applies to