OverflowPresenter Class
Represents a control that allows inline scrolling when its content overflows.
public class OverflowPresenter : FrameworkElement, IOrientedElement
- Inheritance:
- object Visual UIElement FrameworkElement object
- Implements:
- IOrientedElement
Constructors
OverflowPresenter()
Initializes an instance of the class.
public OverflowPresenter()
Properties
CanScrollBackward
Indicates whether the control can currently be scrolled backward.
public bool CanScrollBackward { get; }
Property Value
- bool:
trueif the control can currently be scrolled backward; otherwise,false.
CanScrollForward
Indicates whether the control can currently be scrolled forward.
public bool CanScrollForward { get; }
Property Value
- bool:
trueif the control can currently be scrolled forward; otherwise,false.
Child
The child UIElement to display in the presenter.
LogicalChildren
Gets an enumerator for logical child elements of this element.
protected override IEnumerator LogicalChildren { get; }
Property Value
- IEnumerator:
An enumerator for logical child elements of this element.
MinChildExtent
The minimum child extent.
Orientation
The orientation of the control.
RequiresAdornerDecorator
Indicates whether the presenter requires an adorner decorator.
public bool RequiresAdornerDecorator { get; set; }
Property Value
- bool:
trueif the presenter requires an adorner decorator; otherwise,false. The default value isfalse.
ScrollButtonStyle
The Style to apply to the scroll buttons.
ScrollButtonStyleKey
The ResourceKey for a Style that may be applied to ButtonBase elements.
ScrollOffset
The current scroll offset.
TargetScrollOffset
The target scroll offset.
VisualChildrenCount
Gets the number of visual child elements within this element.
protected override int VisualChildrenCount { get; }
Property Value
- int:
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 FrameworkElement derived class.
protected override Size ArrangeOverride(Size finalSize)
| Parameter | Type | Description |
|---|---|---|
| finalSize | Size | The final area within the parent that this element should use to arrange itself and its children. |
Returns
- Size:
The actual size used.
GetVisualChild(int)
Overrides GetVisualChild(int), and returns a child at the specified index from a collection of child elements.
protected override Visual GetVisualChild(int index)
| Parameter | Type | Description |
|---|---|---|
| index | int | The zero-based index of the requested child element in the collection. |
Returns
- 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 FrameworkElement-derived class.
protected override Size MeasureOverride(Size availableSize)
| Parameter | Type | Description |
|---|---|---|
| availableSize | 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.
OnScrollOffsetChanged(RoutedEventArgs)
Occurs when the ScrollOffset property value has changed.
protected virtual void OnScrollOffsetChanged(RoutedEventArgs e)
| Parameter | Type | Description |
|---|---|---|
| e | RoutedEventArgs | The RoutedEventArgs containing data related to this event. |
Events
ScrollOffsetChanged
Occurs when the ScrollOffset property changes
Fields
CanScrollBackwardProperty
Defines the CanScrollBackward property.
public static readonly DependencyProperty CanScrollBackwardProperty
CanScrollForwardProperty
Defines the CanScrollForward property.
public static readonly DependencyProperty CanScrollForwardProperty
MinChildExtentProperty
Defines the MinChildExtent property.
public static readonly DependencyProperty MinChildExtentProperty
OrientationProperty
Defines the Orientation property.
public static readonly DependencyProperty OrientationProperty
RequiresAdornerDecoratorProperty
Defines the RequiresAdornerDecorator property.
public static readonly DependencyProperty RequiresAdornerDecoratorProperty
ScrollButtonStyleProperty
Defines the ScrollButtonStyle property.
public static readonly DependencyProperty ScrollButtonStyleProperty
ScrollOffsetChangedEvent
Defines the ScrollOffsetChanged routed event.
public static readonly RoutedEvent ScrollOffsetChangedEvent
ScrollOffsetProperty
Defines the ScrollOffset property.
public static readonly DependencyProperty ScrollOffsetProperty
TargetScrollOffsetProperty
Defines the TargetScrollOffset property.
public static readonly DependencyProperty TargetScrollOffsetProperty