In This Article

PopupControlService Class

Represents a service that provides properties and events for controls that host popups.

public class PopupControlService
Inheritance:
object object

Methods

AttachToInputManager()

Attaches to the InputManager.

public static void AttachToInputManager()

CloseAllPopups(PopupCloseReason)

Closes all open popups.

public static void CloseAllPopups(PopupCloseReason closeReason)
Parameter Type Description
closeReason PopupCloseReason

A PopupCloseReason specifying why the popup was closed.

CloseUpToRootPopup(PopupCloseReason)

Closes all popups but leaves the topmost popup open, which is useful for a minimized ribbon popup.

public static void CloseUpToRootPopup(PopupCloseReason closeReason)
Parameter Type Description
closeReason PopupCloseReason

A PopupCloseReason specifying why the popup was closed.

DetachFromInputManager()

Detaches from the InputManager.

public static void DetachFromInputManager()

GetCustomPopupPlacementCallback(DependencyObject)

Gets the value of the CustomPopupPlacementCallback attached property for the specified object.

public static CustomPopupPlacementCallback GetCustomPopupPlacementCallback(DependencyObject obj)
Parameter Type Description
obj DependencyObject

The object from which the property value is read.

Returns

CustomPopupPlacementCallback:

The object's value.

GetHasPopup(DependencyObject)

Gets the value of the HasPopup attached property for the specified object.

public static bool GetHasPopup(DependencyObject obj)
Parameter Type Description
obj DependencyObject

The object from which the property value is read.

Returns

bool:

The object's value.

GetIsPopupOpen(DependencyObject)

Gets the value of the IsPopupOpen attached property for the specified object.

public static bool GetIsPopupOpen(DependencyObject obj)
Parameter Type Description
obj DependencyObject

The object from which the property value is read.

Returns

bool:

The object's value.

GetPopupContent(DependencyObject)

Gets the value of the PopupContent attached property for the specified object.

public static object GetPopupContent(DependencyObject obj)
Parameter Type Description
obj DependencyObject

The object from which the property value is read.

Returns

object:

The object's value.

GetPopupContentTemplate(DependencyObject)

Gets the value of the PopupContentTemplate attached property for the specified object.

public static DataTemplate GetPopupContentTemplate(DependencyObject obj)
Parameter Type Description
obj DependencyObject

The object from which the property value is read.

Returns

DataTemplate:

The object's value.

GetPopupContentTemplateSelector(DependencyObject)

Gets the value of the PopupContentTemplateSelector attached property for the specified object.

public static DataTemplateSelector GetPopupContentTemplateSelector(DependencyObject obj)
Parameter Type Description
obj DependencyObject

The object from which the property value is read.

Returns

DataTemplateSelector:

The object's value.

GetPopupHorizontalOffset(DependencyObject)

Gets the value of the PopupHorizontalOffset attached property for the specified object.

public static double GetPopupHorizontalOffset(DependencyObject obj)
Parameter Type Description
obj DependencyObject

The object from which the property value is read.

Returns

double:

The object's value.

GetPopupPlacement(DependencyObject)

Gets the value of the PopupPlacement attached property for the specified object.

public static PlacementMode GetPopupPlacement(DependencyObject obj)
Parameter Type Description
obj DependencyObject

The object from which the property value is read.

Returns

PlacementMode:

The object's value.

GetPopupPlacementRectangle(DependencyObject)

Gets the value of the PopupPlacementRectangle attached property for the specified object.

public static Rect GetPopupPlacementRectangle(DependencyObject obj)
Parameter Type Description
obj DependencyObject

The object from which the property value is read.

Returns

Rect:

The object's value.

GetPopupPlacementTarget(DependencyObject)

Gets the value of the PopupPlacementTarget attached property for the specified object.

public static UIElement GetPopupPlacementTarget(DependencyObject obj)
Parameter Type Description
obj DependencyObject

The object from which the property value is read.

Returns

UIElement:

The object's value.

GetPopupResizeMode(DependencyObject)

Gets the value of the PopupResizeMode attached property for the specified object.

public static ControlResizeMode GetPopupResizeMode(DependencyObject obj)
Parameter Type Description
obj DependencyObject

The object from which the property value is read.

Returns

ControlResizeMode:

The object's value.

GetPopupVerticalOffset(DependencyObject)

Gets the value of the PopupVerticalOffset attached property for the specified object.

public static double GetPopupVerticalOffset(DependencyObject obj)
Parameter Type Description
obj DependencyObject

The object from which the property value is read.

Returns

double:

The object's value.

GetStaysOpenOnClick(DependencyObject)

Gets the value of the StaysOpenOnClick attached property for the specified object.

public static bool GetStaysOpenOnClick(DependencyObject obj)
Parameter Type Description
obj DependencyObject

The object from which the property value is read.

Returns

bool:

The object's value.

SetCustomPopupPlacementCallback(DependencyObject, CustomPopupPlacementCallback)

Sets the value of the CustomPopupPlacementCallback attached property to the specified object.

public static void SetCustomPopupPlacementCallback(DependencyObject obj, CustomPopupPlacementCallback value)
Parameter Type Description
obj DependencyObject

The object to which the attached property is written.

value CustomPopupPlacementCallback

The value to set.

SetHasPopup(DependencyObject, bool)

Sets the value of the HasPopup attached property to the specified object.

public static void SetHasPopup(DependencyObject obj, bool value)
Parameter Type Description
obj DependencyObject

The object to which the attached property is written.

value bool

The value to set.

SetIsPopupOpen(DependencyObject, bool)

Sets the value of the IsPopupOpen attached property to the specified object.

public static void SetIsPopupOpen(DependencyObject obj, bool value)
Parameter Type Description
obj DependencyObject

The object to which the attached property is written.

value bool

The value to set.

SetPopupContent(DependencyObject, object)

Sets the value of the PopupContent attached property to the specified object.

public static void SetPopupContent(DependencyObject obj, object value)
Parameter Type Description
obj DependencyObject

The object to which the attached property is written.

value object

The value to set.

SetPopupContentTemplate(DependencyObject, DataTemplate)

Sets the value of the PopupContentTemplate attached property to the specified object.

public static void SetPopupContentTemplate(DependencyObject obj, DataTemplate value)
Parameter Type Description
obj DependencyObject

The object to which the attached property is written.

value DataTemplate

The value to set.

SetPopupContentTemplateSelector(DependencyObject, DataTemplateSelector)

Sets the value of the PopupContentTemplateSelector attached property to the specified object.

public static void SetPopupContentTemplateSelector(DependencyObject obj, DataTemplateSelector value)
Parameter Type Description
obj DependencyObject

The object to which the attached property is written.

value DataTemplateSelector

The value to set.

SetPopupHorizontalOffset(DependencyObject, double)

Sets the value of the PopupHorizontalOffset attached property to the specified object.

public static void SetPopupHorizontalOffset(DependencyObject obj, double value)
Parameter Type Description
obj DependencyObject

The object to which the attached property is written.

value double

The value to set.

SetPopupPlacement(DependencyObject, PlacementMode)

Sets the value of the PopupPlacement attached property to the specified object.

public static void SetPopupPlacement(DependencyObject obj, PlacementMode value)
Parameter Type Description
obj DependencyObject

The object to which the attached property is written.

value PlacementMode

The value to set.

SetPopupPlacementRectangle(DependencyObject, Rect)

Sets the value of the PopupPlacementRectangle attached property to the specified object.

public static void SetPopupPlacementRectangle(DependencyObject obj, Rect value)
Parameter Type Description
obj DependencyObject

The object to which the attached property is written.

value Rect

The value to set.

SetPopupPlacementTarget(DependencyObject, UIElement)

Sets the value of the PopupPlacementTarget attached property to the specified object.

public static void SetPopupPlacementTarget(DependencyObject obj, UIElement value)
Parameter Type Description
obj DependencyObject

The object to which the attached property is written.

value UIElement

The value to set.

SetPopupResizeMode(DependencyObject, ControlResizeMode)

Sets the value of the PopupResizeMode attached property to the specified object.

public static void SetPopupResizeMode(DependencyObject obj, ControlResizeMode value)
Parameter Type Description
obj DependencyObject

The object to which the attached property is written.

value ControlResizeMode

The value to set.

SetPopupVerticalOffset(DependencyObject, double)

Sets the value of the PopupVerticalOffset attached property to the specified object.

public static void SetPopupVerticalOffset(DependencyObject obj, double value)
Parameter Type Description
obj DependencyObject

The object to which the attached property is written.

value double

The value to set.

SetStaysOpenOnClick(DependencyObject, bool)

Sets the value of the StaysOpenOnClick attached property to the specified object.

public static void SetStaysOpenOnClick(DependencyObject obj, bool value)
Parameter Type Description
obj DependencyObject

The object to which the attached property is written.

value bool

The value to set.

Fields

CustomPopupPlacementCallbackProperty

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

public static readonly DependencyProperty CustomPopupPlacementCallbackProperty

HasPopupProperty

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

public static readonly DependencyProperty HasPopupProperty

IsPopupOpenProperty

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

public static readonly DependencyProperty IsPopupOpenProperty

PopupClosedEvent

Identifies the PopupClosed routed event. This field is read-only.

public static readonly RoutedEvent PopupClosedEvent

PopupContentProperty

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

public static readonly DependencyProperty PopupContentProperty

PopupContentTemplateProperty

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

public static readonly DependencyProperty PopupContentTemplateProperty

PopupContentTemplateSelectorProperty

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

public static readonly DependencyProperty PopupContentTemplateSelectorProperty

PopupHasBorderProperty

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

public static readonly DependencyProperty PopupHasBorderProperty

PopupHorizontalOffsetProperty

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

public static readonly DependencyProperty PopupHorizontalOffsetProperty

PopupOpenedEvent

Identifies the PopupOpened routed event. This field is read-only.

public static readonly RoutedEvent PopupOpenedEvent

PopupOpeningEvent

Identifies the PopupOpening routed event. This field is read-only.

public static readonly RoutedEvent PopupOpeningEvent

PopupPlacementProperty

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

public static readonly DependencyProperty PopupPlacementProperty

PopupPlacementRectangleProperty

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

public static readonly DependencyProperty PopupPlacementRectangleProperty

PopupPlacementTargetProperty

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

public static readonly DependencyProperty PopupPlacementTargetProperty

PopupResizeModeProperty

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

public static readonly DependencyProperty PopupResizeModeProperty

PopupVerticalOffsetProperty

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

public static readonly DependencyProperty PopupVerticalOffsetProperty

StaysOpenOnClickProperty

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

public static readonly DependencyProperty StaysOpenOnClickProperty

Inherited Members