In This Article

PopupContentPresenter Class

Represents a ContentPresenter control that can be used on a ribbon control popup.

public class PopupContentPresenter : ContentPresenter
Inheritance:
object Visual UIElement FrameworkElement ContentPresenter object

Constructors

PopupContentPresenter()

Initializes an instance of the class.

public PopupContentPresenter()

Methods

MeasureOverride(Size)

When overridden in a derived class, measures the size in layout required for child elements and determines a size for the FrameworkElement-derived class.

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

The available size that this element can give to child elements. Infinity can be specified as a value to indicate that the element will size to whatever content is available.

Returns

Size:

The size that this element determines it needs during layout, based on its calculations of child element sizes.

OnKeyDown(KeyEventArgs)

Invoked when an unhandled KeyDownEvent attached event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event.

protected override void OnKeyDown(KeyEventArgs e)
Parameter Type Description
e KeyEventArgs

The KeyEventArgs that contains the event data.

Remarks

This code handles the .NET 3.0 bug mentioned in this post where directional keys will not function if encompassed by a ScrollViewer: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=2089109&SiteID=1