Compartir a través de


IXRScrollBar::SetViewportSize (Compact 2013)

3/28/2014

This method sets how much of the scrollable content is currently visible.

Syntax

virtual HRESULT STDMETHODCALLTYPE SetViewportSize(
    __in  float   ViewportSize
) = 0;

Parameters

  • ViewportSize
    A float value that indicates how much of the scrollable content will be visible.

Return Value

Returns an HRESULT that indicates success or failure.

Remarks

The units that are used for ViewportSize are the same units that are used to describe the length of the content. Some examples include lines of text, or pages of text.

The value in ViewportSize is used to calculate the size of the IXRThumb control that is displayed as the sliding value indicator in an IXRScrollBar control. The IXRThumb control has a minimum size that is defined by the operating system. The size of an IXRThumb control becomes larger as more content is visible. For example, if 25 percent of a thumb-control's content is visible, the control occupies 25 percent of the track in which it moves.

.NET Framework Equivalent

System.Windows.Controls.Primitives.ScrollBar.ViewportSize

Requirements

Header

XamlRuntime.h

sysgen

SYSGEN_XAML_RUNTIME

See Also

Reference

IXRScrollBar
IXRScrollbar::GetViewportSize