In This Article

OverflowPresenter Class

Represents a control that allows inline scrolling when its content overflows.

public class OverflowPresenter : FrameworkElement, DUCE.IResource, IAnimatable, IFrameworkInputElement, IInputElement, ISupportInitialize, IHaveResources, IQueryAmbient, IOrientedElement, IScrollProvider
Inheritance:
System.Object System.Windows.Threading.DispatcherObject System.Windows.DependencyObject System.Windows.Media.Visual System.Windows.UIElement System.Windows.FrameworkElement Object
Implements:
IOrientedElement

Constructors

OverflowPresenter()

public OverflowPresenter()

Properties

CanScrollBackward

Gets whether the control can currently be scrolled backward.

public bool CanScrollBackward { get; }

Property Value

System.Boolean:

true if the control can currently be scrolled backward; otherwise, false.

CanScrollForward

Gets whether the control can currently be scrolled forward.

public bool CanScrollForward { get; }

Property Value

System.Boolean:

true if the control can currently be scrolled forward; otherwise, false.

Child

Gets or sets the child System.Windows.UIElement to display in the presenter.

public UIElement Child { get; set; }

Property Value

System.Windows.UIElement:

The child System.Windows.UIElement to display in the presenter.

LogicalChildren

Gets an enumerator for logical child elements of this element.

protected override IEnumerator LogicalChildren { get; }

Property Value

System.Collections.IEnumerator:

An enumerator for logical child elements of this element.

MinChildExtent

Gets or sets the minimum child extent.

public double MinChildExtent { get; set; }

Property Value

System.Double:

The minimum child extent. The default value is 0.

Orientation

Gets or sets the orientation of the control.

public Orientation Orientation { get; set; }

Property Value

System.Windows.Controls.Orientation:

The orientation of the control.

RequiresAdornerDecorator

Gets or sets whether the presenter requires an adorner decorator.

public bool RequiresAdornerDecorator { get; set; }

Property Value

System.Boolean:

true if the presenter requires an adorner decorator; otherwise, false. The default value is false.

ScrollButtonStyle

Gets or sets the System.Windows.Style to apply to the scroll buttons.

public Style ScrollButtonStyle { get; set; }

Property Value

System.Windows.Style:

The System.Windows.Style to apply to the scroll buttons.

ScrollButtonStyleKey

Gets the System.Windows.ResourceKey for a System.Windows.Style that may be applied to ButtonBase elements.

public static ResourceKey ScrollButtonStyleKey { get; }

Property Value

System.Windows.ResourceKey:

A resource key.

ScrollOffset

Gets the current scroll offset.

public double ScrollOffset { get; }

Property Value

System.Double:

The current scroll offset.

TargetScrollOffset

Gets the target scroll offset.

public double TargetScrollOffset { get; }

Property Value

System.Double:

The target scroll offset.

VisualChildrenCount

Gets the number of visual child elements within this element.

protected override int VisualChildrenCount { get; }

Property Value

System.Int32:

The number of visual child elements for this element.

Methods

ArrangeOverride(Size)

When overridden in a derived class, positions child elements and determines a size for a System.Windows.FrameworkElement derived class.

protected override Size ArrangeOverride(Size finalSize)
Parameter Type Description
finalSize System.Windows.Size

The final area within the parent that this element should use to arrange itself and its children.

Returns

System.Windows.Size:

The actual size used.

GetVisualChild(Int32)

Overrides GetVisualChild(Int32), and returns a child at the specified index from a collection of child elements.

protected override Visual GetVisualChild(int index)
Parameter Type Description
index System.Int32

The zero-based index of the requested child element in the collection.

Returns

System.Windows.Media.Visual:

The requested child element. This should not return null; if the provided index is out of range, an exception is thrown.

MeasureOverride(Size)

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

protected override Size MeasureOverride(Size availableSize)
Parameter Type Description
availableSize System.Windows.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

System.Windows.Size:

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

OnScrollOffsetChanged(RoutedEventArgs)

Occurs when the ScrollOffset property value has changed.

protected virtual void OnScrollOffsetChanged(RoutedEventArgs e)
Parameter Type Description
e System.Windows.RoutedEventArgs

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

Events

ScrollOffsetChanged

Occurs when the ScrollOffset property changes

public event RoutedEventHandler ScrollOffsetChanged

Event Type

System.Windows.RoutedEventHandler

Fields

CanScrollBackwardProperty

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

public static readonly DependencyProperty CanScrollBackwardProperty

CanScrollForwardProperty

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

public static readonly DependencyProperty CanScrollForwardProperty

MinChildExtentProperty

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

public static readonly DependencyProperty MinChildExtentProperty

OrientationProperty

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

public static readonly DependencyProperty OrientationProperty

RequiresAdornerDecoratorProperty

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

public static readonly DependencyProperty RequiresAdornerDecoratorProperty

ScrollButtonStyleProperty

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

public static readonly DependencyProperty ScrollButtonStyleProperty

ScrollOffsetChangedEvent

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

public static readonly RoutedEvent ScrollOffsetChangedEvent

ScrollOffsetProperty

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

public static readonly DependencyProperty ScrollOffsetProperty

TargetScrollOffsetProperty

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

public static readonly DependencyProperty TargetScrollOffsetProperty

Inherited Members

  • System.Object.ToString()
  • System.Object.Equals(System.Object)
  • System.Object.Equals(System.Object, System.Object)
  • System.Object.ReferenceEquals(System.Object, System.Object)
  • System.Object.GetHashCode()
  • System.Object.GetType()
  • System.Object.MemberwiseClone()

Extension Methods