Class AutoScrollBehavior
- Namespace
- McServerLauncher.Behaviors
- Assembly
- McServerLauncher.dll
Attached property that makes a ListBox auto-scroll to the end when items are added (useful for the real-time console).
public static class AutoScrollBehavior
- Inheritance
-
AutoScrollBehavior
- Inherited Members
Remarks
Every scroll is deferred and folded together (see McServerLauncher.Behaviors.ScrollCoalescer). That matters most when the bound collection is swapped, which is what selecting another server does: scrolling a freshly bound list of two thousand wrapped lines forces the virtualizer to measure its way to the bottom, and doing it inline made switching to a running server visibly slower than switching to a stopped one. Queued at Avalonia.Threading.DispatcherPriority.Background, the new server's console is on screen first and the scroll happens once the frame is done.
Fields
AutoScrollProperty
public static readonly AttachedProperty<bool> AutoScrollProperty
Field Value
- AttachedProperty<bool>
Methods
GetAutoScroll(ListBox)
public static bool GetAutoScroll(ListBox o)
Parameters
oListBox
Returns
SetAutoScroll(ListBox, bool)
public static void SetAutoScroll(ListBox o, bool value)
Parameters
oListBoxvaluebool