|
|
@ -37,9 +37,8 @@ namespace Avalonia.Controls.Primitives |
|
|
/// <summary>
|
|
|
/// <summary>
|
|
|
/// Defines the <see cref="ShowMode"/> property
|
|
|
/// Defines the <see cref="ShowMode"/> property
|
|
|
/// </summary>
|
|
|
/// </summary>
|
|
|
public static readonly DirectProperty<PopupFlyoutBase, FlyoutShowMode> ShowModeProperty = |
|
|
public static readonly StyledProperty<FlyoutShowMode> ShowModeProperty = |
|
|
AvaloniaProperty.RegisterDirect<PopupFlyoutBase, FlyoutShowMode>(nameof(ShowMode), |
|
|
AvaloniaProperty.Register<PopupFlyoutBase, FlyoutShowMode>(nameof(ShowMode)); |
|
|
x => x.ShowMode, (x, v) => x.ShowMode = v); |
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
/// <summary>
|
|
|
/// Defines the <see cref="OverlayInputPassThroughElement"/> property
|
|
|
/// Defines the <see cref="OverlayInputPassThroughElement"/> property
|
|
|
@ -50,7 +49,6 @@ namespace Avalonia.Controls.Primitives |
|
|
(o, v) => o._overlayInputPassThroughElement = v); |
|
|
(o, v) => o._overlayInputPassThroughElement = v); |
|
|
|
|
|
|
|
|
private readonly Lazy<Popup> _popupLazy; |
|
|
private readonly Lazy<Popup> _popupLazy; |
|
|
private FlyoutShowMode _showMode = FlyoutShowMode.Standard; |
|
|
|
|
|
private Rect? _enlargedPopupRect; |
|
|
private Rect? _enlargedPopupRect; |
|
|
private PixelRect? _enlargePopupRectScreenPixelRect; |
|
|
private PixelRect? _enlargePopupRectScreenPixelRect; |
|
|
private IDisposable? _transientDisposable; |
|
|
private IDisposable? _transientDisposable; |
|
|
@ -81,39 +79,38 @@ namespace Avalonia.Controls.Primitives |
|
|
/// <inheritdoc cref="Popup.PlacementGravity"/>
|
|
|
/// <inheritdoc cref="Popup.PlacementGravity"/>
|
|
|
public PopupGravity PlacementGravity |
|
|
public PopupGravity PlacementGravity |
|
|
{ |
|
|
{ |
|
|
get { return GetValue(PlacementGravityProperty); } |
|
|
get => GetValue(PlacementGravityProperty); |
|
|
set { SetValue(PlacementGravityProperty, value); } |
|
|
set => SetValue(PlacementGravityProperty, value); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/// <inheritdoc cref="Popup.PlacementAnchor"/>
|
|
|
/// <inheritdoc cref="Popup.PlacementAnchor"/>
|
|
|
public PopupAnchor PlacementAnchor |
|
|
public PopupAnchor PlacementAnchor |
|
|
{ |
|
|
{ |
|
|
get { return GetValue(PlacementAnchorProperty); } |
|
|
get => GetValue(PlacementAnchorProperty); |
|
|
set { SetValue(PlacementAnchorProperty, value); } |
|
|
set => SetValue(PlacementAnchorProperty, value); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/// <inheritdoc cref="Popup.HorizontalOffset"/>
|
|
|
/// <inheritdoc cref="Popup.HorizontalOffset"/>
|
|
|
public double HorizontalOffset |
|
|
public double HorizontalOffset |
|
|
{ |
|
|
{ |
|
|
get { return GetValue(HorizontalOffsetProperty); } |
|
|
get => GetValue(HorizontalOffsetProperty); |
|
|
set { SetValue(HorizontalOffsetProperty, value); } |
|
|
set => SetValue(HorizontalOffsetProperty, value); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/// <inheritdoc cref="Popup.VerticalOffset"/>
|
|
|
/// <inheritdoc cref="Popup.VerticalOffset"/>
|
|
|
public double VerticalOffset |
|
|
public double VerticalOffset |
|
|
{ |
|
|
{ |
|
|
get { return GetValue(VerticalOffsetProperty); } |
|
|
get => GetValue(VerticalOffsetProperty); |
|
|
set { SetValue(VerticalOffsetProperty, value); } |
|
|
set => SetValue(VerticalOffsetProperty, value); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
/// <summary>
|
|
|
/// Gets or sets the desired ShowMode
|
|
|
/// Gets or sets the desired ShowMode
|
|
|
/// </summary>
|
|
|
/// </summary>
|
|
|
public FlyoutShowMode ShowMode |
|
|
public FlyoutShowMode ShowMode |
|
|
{ |
|
|
{ |
|
|
get => _showMode; |
|
|
get => GetValue(ShowModeProperty); |
|
|
set => SetAndRaise(ShowModeProperty, ref _showMode, value); |
|
|
set => SetValue(ShowModeProperty, value); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
/// <summary>
|
|
|
|