|
|
|
@ -62,6 +62,12 @@ namespace Avalonia.Controls |
|
|
|
public static readonly StyledProperty<Rect?> PlacementRectProperty = |
|
|
|
AvaloniaProperty.Register<Popup, Rect?>(nameof(PlacementRect)); |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Defines the <see cref="WindowManagerAddShadowHint"/> property.
|
|
|
|
/// </summary>
|
|
|
|
public static readonly StyledProperty<bool> WindowManagerAddShadowHintProperty = |
|
|
|
Popup.WindowManagerAddShadowHintProperty.AddOwner<ContextMenu>(); |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Defines the <see cref="PlacementTarget"/> property.
|
|
|
|
/// </summary>
|
|
|
|
@ -158,6 +164,12 @@ namespace Avalonia.Controls |
|
|
|
set { SetValue(PlacementModeProperty, value); } |
|
|
|
} |
|
|
|
|
|
|
|
public bool WindowManagerAddShadowHint |
|
|
|
{ |
|
|
|
get { return GetValue(WindowManagerAddShadowHintProperty); } |
|
|
|
set { SetValue(WindowManagerAddShadowHintProperty, value); } |
|
|
|
} |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Gets or sets the the anchor rectangle within the parent that the context menu will be placed
|
|
|
|
/// relative to when <see cref="PlacementMode"/> is <see cref="PlacementMode.AnchorAndGravity"/>.
|
|
|
|
@ -267,6 +279,7 @@ namespace Avalonia.Controls |
|
|
|
PlacementTarget = PlacementTarget ?? control, |
|
|
|
IsLightDismissEnabled = true, |
|
|
|
OverlayDismissEventPassThrough = true, |
|
|
|
WindowManagerAddShadowHint = WindowManagerAddShadowHint, |
|
|
|
}; |
|
|
|
|
|
|
|
_popup.Opened += PopupOpened; |
|
|
|
|