In This Article

ResizablePopupContentHost Class

Represents a control intended for use within a popup that can host child content and apply drag-resizing to the nested DragResizableControl.

[TemplatePart(Name = "PART_ResizeGrip", Type = typeof(PopupResizeGrip))]
public class ResizablePopupContentHost : Control
Inheritance:
object Visual UIElement FrameworkElement Control object

Constructors

ResizablePopupContentHost()

Initializes an instance of the ResizablePopupContentHost class.

public ResizablePopupContentHost()

Properties

Child

Gets or sets the child UIElement to host in the control.

public UIElement Child { get; set; }

Property Value

UIElement:

The child UIElement to host in the control.

CornerRadius

Gets or sets the CornerRadius for the control's border.

public CornerRadius CornerRadius { get; set; }

Property Value

CornerRadius:

The CornerRadius for the control's border.

DragResizableControl

Gets or sets the primary IDragResizableControl within the control's hierarchy, which can handle resizing requests.

public IDragResizableControl DragResizableControl { get; set; }

Property Value

IDragResizableControl:

The primary IDragResizableControl within the control's hierarchy, which can handle resizing requests.

HandlesScrolling

Gets whether the control handles scrolling.

protected override bool HandlesScrolling { get; }

Property Value

bool:

This control always handles scrolling by returning true.

IsTopLevelMenuPopup

Gets or sets whether the popup is for a top-level menu.

public bool IsTopLevelMenuPopup { get; set; }

Property Value

bool:

true if the popup is for a top-level menu; otherwise, false.

RequestedMinWidth

Gets or sets the requested minimum width.

public double RequestedMinWidth { get; set; }

Property Value

double:

The requested minimum width.

ResizeMode

Gets or sets a ControlResizeMode indicating the resize mode.

public ControlResizeMode ResizeMode { get; set; }

Property Value

ControlResizeMode:

A ControlResizeMode indicating the resize mode.

Methods

MeasureOverride(Size)

Measures all children given an available size and returns the element's desired size based on the size of its children.

protected override Size MeasureOverride(Size constraint)
Parameter Type Description
constraint Size

The size the element is suggested to fit inside.

Returns

Size:

The desired size of the element.

OnApplyTemplate()

Invoked whenever application code or internal processes call ApplyTemplate.

public override void OnApplyTemplate()

OnPropertyChanged(DependencyPropertyChangedEventArgs)

Occurs when a property value is changed.

protected override void OnPropertyChanged(DependencyPropertyChangedEventArgs e)
Parameter Type Description
e DependencyPropertyChangedEventArgs

The System.Windows.DependencyPropertyChangedEventArgs containing data related to this event.

Fields

ChildProperty

Identifies the Child dependency property. This field is read-only.

public static readonly DependencyProperty ChildProperty

CornerRadiusProperty

Identifies the CornerRadius dependency property. This field is read-only.

public static readonly DependencyProperty CornerRadiusProperty

DragResizableControlProperty

Identifies the DragResizableControl dependency property. This field is read-only.

public static readonly DependencyProperty DragResizableControlProperty

IsTopLevelMenuPopupProperty

Identifies the IsTopLevelMenuPopup dependency property. This field is read-only.

public static readonly DependencyProperty IsTopLevelMenuPopupProperty

RequestedMinWidthProperty

Identifies the RequestedMinWidth dependency property. This field is read-only.

public static readonly DependencyProperty RequestedMinWidthProperty

ResizeModeProperty

Identifies the ResizeMode dependency property. This field is read-only.

public static readonly DependencyProperty ResizeModeProperty