Class WindowScroller
The is a container class to help to scroll a window
Inheritance
Namespace: Dapplo.Windows.Desktop
Assembly: Dapplo.Windows.dll
Syntax
public class WindowScroller : object
Properties
| Improve this Doc View SourceInitialScrollInfo
This is used to be able to reset the location, and also detect if we are at the end. Some windows might add content when the user is (almost) at the end.
Declaration
public ScrollInfo InitialScrollInfo { get; }
Property Value
Type | Description |
---|---|
ScrollInfo |
IsAtEnd
Returns true if the scroller is at the end
Declaration
public bool IsAtEnd { get; }
Property Value
Type | Description |
---|---|
System.Boolean | bool |
IsAtStart
Returns true if the scroller is at the start
Declaration
public bool IsAtStart { get; }
Property Value
Type | Description |
---|---|
System.Boolean | bool |
KeepInitialBounds
Some windows might add content when the user is (almost) at the end. If this is true, the scrolling doesn't go beyond the intial bounds. If this is false, the initial value is only used for reset.
Declaration
public bool KeepInitialBounds { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
ScrollBar
Get the information on the used scrollbar, if any. This can be used to detect the location of the scrollbar
Declaration
public ScrollBarInfo? ScrollBar { get; }
Property Value
Type | Description |
---|---|
System.Nullable<ScrollBarInfo> |
ScrollBarType
What scrollbar to use
Declaration
public ScrollBarTypes ScrollBarType { get; }
Property Value
Type | Description |
---|---|
ScrollBarTypes |
ScrollBarWindow
Area of the scrollbar, this can be the WindowToScroll
Declaration
public IInteropWindow ScrollBarWindow { get; set; }
Property Value
Type | Description |
---|---|
IInteropWindow |
ScrollingWindow
Area which is scrolling, can be the WindowToScroll
Declaration
public IInteropWindow ScrollingWindow { get; set; }
Property Value
Type | Description |
---|---|
IInteropWindow |
ScrollMode
Specify which scroll mode needs to be used
Declaration
public ScrollModes ScrollMode { get; set; }
Property Value
Type | Description |
---|---|
ScrollModes |
ScrollWheelLinesFromRegistry
Get the scroll-lines from the registry
Declaration
public static int ScrollWheelLinesFromRegistry { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
ShowChanges
Does the scrollbar need to represent the changes?
Declaration
public bool ShowChanges { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
WheelDelta
Amount of delta the scrollwheel scrolls
Declaration
public int WheelDelta { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
Methods
| Improve this Doc View SourceEnd()
Move to the end
Declaration
public bool End()
Returns
Type | Description |
---|---|
System.Boolean | bool if this worked |
GetPosition(out ScrollInfo)
Get current position
Declaration
public bool GetPosition(out ScrollInfo scrollInfo)
Parameters
Type | Name | Description |
---|---|---|
ScrollInfo | scrollInfo |
Returns
Type | Description |
---|---|
System.Boolean | SCROLLINFO |
GetScrollbarInfo(Boolean)
Method to set the ScrollbarInfo, if we can get it
Declaration
public ScrollBarInfo? GetScrollbarInfo(bool forceUpdate = false)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | forceUpdate | set to true to force an update, default is false |
Returns
Type | Description |
---|---|
System.Nullable<ScrollBarInfo> | ScrollBarInfo? |
NeedsFocus()
Returns true if the window needs focus to scroll
Declaration
public bool NeedsFocus()
Returns
Type | Description |
---|---|
System.Boolean | true if focus is needed |
Next()
Go to the next "page"
Declaration
public bool Next()
Returns
Type | Description |
---|---|
System.Boolean | bool if this worked |
Previous()
Go to the previous "page"
Declaration
public bool Previous()
Returns
Type | Description |
---|---|
System.Boolean | bool if this worked |
Reset()
Set the position back to the original, only works for windows which support ScrollModes.WindowsMessage
Declaration
public bool Reset()
Returns
Type | Description |
---|---|
System.Boolean | true if this worked |
Start()
Move to the start
Declaration
public bool Start()
Returns
Type | Description |
---|---|
System.Boolean | bool if this worked |