Class PopupPositioningBehavior
Behavior that positions the System.Windows.Controls.Primitives.Popup relative to its PlacementTarget and within the borders of its Owner
Inheritance
Implements
Namespace: Sartorius.SAF.Presentation.Behaviors
Assembly: Sartorius.SAF.Presentation.dll
Syntax
public class PopupPositioningBehavior : Behavior<Popup>, IAnimatable, IAttachedObject
Constructors
View SourcePopupPositioningBehavior()
Initializes a new instance of the PopupPositioningBehavior class.
Declaration
public PopupPositioningBehavior()
Fields
View SourceExplicitHeightProperty
The explicit height property
Declaration
public static readonly DependencyProperty ExplicitHeightProperty
Field Value
Type | Description |
---|---|
System.Windows.DependencyProperty |
MarginProperty
The popup margin property.
Declaration
public static readonly DependencyProperty MarginProperty
Field Value
Type | Description |
---|---|
System.Windows.DependencyProperty |
OwnerProperty
The owner property.
Declaration
public static readonly DependencyProperty OwnerProperty
Field Value
Type | Description |
---|---|
System.Windows.DependencyProperty |
PlacementTargetGapWidthProperty
The placement target gap width property (default is 20)
Declaration
public static readonly DependencyProperty PlacementTargetGapWidthProperty
Field Value
Type | Description |
---|---|
System.Windows.DependencyProperty |
Properties
View SourceExplicitHeight
Property to set an explicit height which should be used for the SelectionOverlay
Declaration
public double ExplicitHeight { get; set; }
Property Value
Type | Description |
---|---|
System.Double |
Margin
Gets or sets the margin of the popup, relative to its owner (default is [80,60,80,140]).
Declaration
public Thickness Margin { get; set; }
Property Value
Type | Description |
---|---|
System.Windows.Thickness |
Owner
Gets or sets the logical owner of the popup where the position calculation is based on.
Declaration
public Window Owner { get; set; }
Property Value
Type | Description |
---|---|
System.Windows.Window |
PlacementTargetGapWidth
Gets or sets the width of the gap between popup and placement target (default is 20).
Declaration
public double PlacementTargetGapWidth { get; set; }
Property Value
Type | Description |
---|---|
System.Double | The width of the gap (default is 20). |
Methods
View SourceOnAttached()
Called when attached.
Declaration
protected override void OnAttached()
Overrides
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | PlacementTarget |
System.ArgumentException | PlacementTarget has to be of type FrameworkElement |