瀏覽代碼

Scenario cleanup. scrolling.md

Tig 8 月之前
父節點
當前提交
f527e599b2

+ 5 - 5
Terminal.Gui/View/View.ScrollBars.cs

@@ -45,7 +45,7 @@ public partial class View
         var scrollBar = new ScrollBar
         {
             Orientation = orientation,
-            AutoHide = true
+            Visible = false, // Initially hidden until needed
         };
 
         if (orientation == Orientation.Vertical)
@@ -207,16 +207,16 @@ public partial class View
         }
         else if (viewportSettings.HasFlag (ViewportSettings.AllowNegativeX))
         {
-            _horizontalScrollBar.Value.AutoHide = false;
+            _horizontalScrollBar.Value.AutoShow = false;
         }
         else if (viewportSettings.HasFlag (ViewportSettings.AllowNegativeY))
         {
-            _verticalScrollBar.Value.AutoHide = false;
+            _verticalScrollBar.Value.AutoShow = false;
         }
         else if (viewportSettings.HasFlag (ViewportSettings.AllowNegativeLocation))
         {
-            _horizontalScrollBar.Value.AutoHide = false;
-            _verticalScrollBar.Value.AutoHide = false;
+            _horizontalScrollBar.Value.AutoShow = false;
+            _verticalScrollBar.Value.AutoShow = false;
         }
         else if (viewportSettings.HasFlag (ViewportSettings.AllowXGreaterThanContentWidth))
         {

+ 16 - 16
Terminal.Gui/Views/ScrollBar/ScrollBar.cs

@@ -4,8 +4,6 @@ using System.ComponentModel;
 
 namespace Terminal.Gui;
 
-// TODO: When scrollbars autohide, reset viewport to 0
-
 /// <summary>
 ///     Indicates the size of scrollable content and controls the position of the visible content, either vertically or
 ///     horizontally.
@@ -16,10 +14,11 @@ namespace Terminal.Gui;
 /// </summary>
 /// <remarks>
 ///     <para>
-///         ScrollBars can be enabled on any View calling <see cref="View.EnableScrollBar"/>. By default, the built-in View scrollbars have
-///         see <see cref="AutoHide"/> set to <see langword="true"/> thus will only be visible if the content size (see <see cref="View.SetContentSize"/> is
-///         larger than see <see cref="View.Viewport"/>
-///      
+///         By default, the built-in View scrollbars have both <see cref="View.Visible"/> and <see cref="AutoShow"/> set to
+///         <see langword="false"/>.
+///         To enable them, either  set <see cref="AutoShow"/> set to <see langword="true"/> or explictly set
+///         <see cref="View.Visible"/>
+///         to <see langword="true"/>.
 ///     </para>
 ///     <para>
 ///         By default, this view cannot be focused and does not support keyboard input.
@@ -97,7 +96,7 @@ public class ScrollBar : View, IOrientation, IDesignable
 
     private void ShowHide ()
     {
-        if (AutoHide)
+        if (AutoShow)
         {
             Visible = VisibleContentSize < ScrollableContentSize;
         }
@@ -202,26 +201,27 @@ public class ScrollBar : View, IOrientation, IDesignable
     /// </remarks>
     public int Increment { get; set; } = 1;
 
-    // AutoHide should be false by default. Views should not be hidden by default.
-    private bool _autoHide;
+    // AutoShow should be false by default. Views should not be hidden by default.
+    private bool _autoShow;
 
     /// <summary>
-    ///     Gets or sets whether <see cref="View.Visible"/> will be set to <see langword="false"/> if the dimension of the
-    ///     scroll bar is greater than or equal to <see cref="ScrollableContentSize"/>.
+    ///     Gets or sets whether <see cref="View.Visible"/> will be set to <see langword="true"/> if the dimension of the
+    ///     scroll bar is less than  <see cref="ScrollableContentSize"/> and <see langword="false"/> if greater than or equal
+    ///     to.
     /// </summary>
     /// <remarks>
     ///     The default is <see langword="false"/>.
     /// </remarks>
-    public bool AutoHide
+    public bool AutoShow
     {
-        get => _autoHide;
+        get => _autoShow;
         set
         {
-            if (_autoHide != value)
+            if (_autoShow != value)
             {
-                _autoHide = value;
+                _autoShow = value;
 
-                if (!AutoHide)
+                if (!AutoShow)
                 {
                     Visible = true;
                 }

+ 0 - 166
UICatalog/Scenarios/AdvancedClipping.cs

@@ -1,166 +0,0 @@
-using System.Text;
-using System.Timers;
-using Terminal.Gui;
-
-namespace UICatalog.Scenarios;
-
-[ScenarioMetadata ("AdvancedClipping", "AdvancedClipping Tester")]
-[ScenarioCategory ("AdvancedClipping")]
-public class AdvancedClipping : Scenario
-{
-    private int _hotkeyCount;
-
-    public override void Main ()
-    {
-        Application.Init ();
-
-        Window app = new ()
-        {
-            Title = GetQuitKeyAndName (),
-            //BorderStyle = LineStyle.None
-        };
-
-        app.DrawingContent += (s, e) =>
-                           {
-                               app!.FillRect (app!.Viewport, CM.Glyphs.Dot);
-                               e.Cancel = true;
-                           };
-
-        var arrangementEditor = new ArrangementEditor ()
-        {
-            X = Pos.AnchorEnd (),
-            Y = 0,
-            AutoSelectViewToEdit = true,
-        };
-        app.Add (arrangementEditor);
-
-        View tiledView1 = CreateTiledView (1, 0, 0);
-
-        tiledView1.Width = 30;
-
-        ProgressBar tiledProgressBar1 = new ()
-        {
-            X = 0,
-            Y = Pos.AnchorEnd (),
-            Width = Dim.Fill (),
-            Id = "tiledProgressBar",
-            BidirectionalMarquee = true,
-        };
-        tiledView1.Add (tiledProgressBar1);
-
-        View tiledView2 = CreateTiledView (2, 4, 2);
-
-        ProgressBar tiledProgressBar2 = new ()
-        {
-            X = 0,
-            Y = Pos.AnchorEnd (),
-            Width = Dim.Fill (),
-            Id = "tiledProgressBar",
-            BidirectionalMarquee = true,
-            ProgressBarStyle = ProgressBarStyle.MarqueeBlocks
-            // BorderStyle = LineStyle.Rounded
-        };
-        tiledView2.Add (tiledProgressBar2);
-
-        app.Add (tiledView1);
-        app.Add (tiledView2);
-
-        View tiledView3 = CreateTiledView (3, 8, 4);
-        app.Add (tiledView3);
-
-        // View overlappedView1 = CreateOverlappedView (1, 30, 2);
-
-        //ProgressBar progressBar = new ()
-        //{
-        //    X = Pos.AnchorEnd (),
-        //    Y = Pos.AnchorEnd (),
-        //    Width = Dim.Fill (),
-        //    Id = "progressBar",
-        //    BorderStyle = LineStyle.Rounded
-        //};
-        //overlappedView1.Add (progressBar);
-
-
-        //View overlappedView2 = CreateOverlappedView (2, 32, 4);
-        //View overlappedView3 = CreateOverlappedView (3, 34, 6);
-
-        //app.Add (overlappedView1);
-        //app.Add (overlappedView2);
-        //app.Add (overlappedView3);
-
-        Timer progressTimer = new Timer (150)
-        {
-            AutoReset = true
-        };
-
-        progressTimer.Elapsed += (s, e) =>
-                                 {
-                                     tiledProgressBar1.Pulse ();
-                                     tiledProgressBar2.Pulse ();
-                                     Application.Wakeup ();
-                                 };
-
-        progressTimer.Start ();
-        Application.Run (app);
-        progressTimer.Stop ();
-        app.Dispose ();
-        Application.Shutdown ();
-
-        return;
-    }
-
-    private View CreateOverlappedView (int id, Pos x, Pos y)
-    {
-        var overlapped = new View
-        {
-            X = x,
-            Y = y,
-            Height = Dim.Auto (minimumContentDim: 4),
-            Width = Dim.Auto (minimumContentDim: 14),
-            Title = $"Overlapped{id} _{GetNextHotKey ()}",
-            ColorScheme = Colors.ColorSchemes ["Toplevel"],
-            Id = $"Overlapped{id}",
-            ShadowStyle = ShadowStyle.Transparent,
-            BorderStyle = LineStyle.Double,
-            CanFocus = true, // Can't drag without this? BUGBUG
-            TabStop = TabBehavior.TabGroup,
-            Arrangement = ViewArrangement.Movable | ViewArrangement.Overlapped | ViewArrangement.Resizable
-        };
-        return overlapped;
-    }
-
-    private View CreateTiledView (int id, Pos x, Pos y)
-    {
-        var tiled = new View
-        {
-            X = x,
-            Y = y,
-            Height = Dim.Auto (minimumContentDim: 8),
-            Width = Dim.Auto (minimumContentDim: 15),
-            Title = $"Tiled{id} _{GetNextHotKey ()}",
-            Id = $"Tiled{id}",
-            Text = $"Tiled{id}",
-            BorderStyle = LineStyle.Single,
-            CanFocus = true, // Can't drag without this? BUGBUG
-            TabStop = TabBehavior.TabStop,
-            Arrangement = ViewArrangement.Movable | ViewArrangement.Resizable,
-            ShadowStyle = ShadowStyle.Transparent,
-        };
-        //tiled.Padding.Thickness = new (1);
-        //tiled.Padding.Diagnostics =  ViewDiagnosticFlags.Thickness;
-
-        //tiled.Margin.Thickness = new (1);
-
-        FrameView fv = new ()
-        {
-            Title = "FrameView",
-            Width = 15,
-            Height = 3,
-        };
-        tiled.Add (fv);
-
-        return tiled;
-    }
-
-    private char GetNextHotKey () { return (char)('A' + _hotkeyCount++); }
-}

+ 2 - 2
UICatalog/Scenarios/CharacterMap/CharMap.cs

@@ -144,7 +144,7 @@ public class CharMap : View, IDesignable
 
         _hScrollBar = new ()
         {
-            AutoHide = false,
+            AutoShow = false,
             X = RowLabelWidth,
             Y = Pos.AnchorEnd (),
             Orientation = Orientation.Horizontal,
@@ -155,7 +155,7 @@ public class CharMap : View, IDesignable
 
         _vScrollBar = new ()
         {
-            AutoHide = false,
+            AutoShow = false,
             X = Pos.AnchorEnd (),
             Y = 1, // Header
             Height = Dim.Fill (Dim.Func (() => Padding.Thickness.Bottom)),

+ 132 - 76
UICatalog/Scenarios/Clipping.cs

@@ -1,113 +1,169 @@
-using System.Collections.Generic;
+using System.Text;
+using System.Timers;
 using Terminal.Gui;
 
 namespace UICatalog.Scenarios;
 
-[ScenarioMetadata ("Clipping", "Used to test that things clip correctly")]
-[ScenarioCategory ("Tests")]
-[ScenarioCategory ("Drawing")]
+[ScenarioMetadata ("Clipping", "Demonstrates non-rectangular clip region support.")]
 [ScenarioCategory ("Scrolling")]
+[ScenarioCategory ("Layout")]
+[ScenarioCategory ("Arrangement")]
+[ScenarioCategory ("Tests")]
 public class Clipping : Scenario
 {
+    private int _hotkeyCount;
+
     public override void Main ()
     {
         Application.Init ();
-        var win = new Window { Title = GetQuitKeyAndName () };
 
-        var label = new Label
+        Window app = new ()
         {
-            X = 0, Y = 0, Text = "ScrollView (new Rectangle (3, 3, 50, 20)) with a 200, 100 GetContentSize ()..."
+            Title = GetQuitKeyAndName (),
+            //BorderStyle = LineStyle.None
         };
-        win.Add (label);
 
-        //var scrollView = new ScrollView { X = 3, Y = 3, Width = 50, Height = 20 };
-        //scrollView.ColorScheme = Colors.ColorSchemes ["Menu"];
-        //// BUGBUG: set_ContentSize is supposed to be `protected`. 
-        //scrollView.SetContentSize (new (200, 100));
+        app.DrawingContent += (s, e) =>
+                           {
+                               app!.FillRect (app!.Viewport, CM.Glyphs.Dot);
+                               e.Cancel = true;
+                           };
 
-        ////ContentOffset = Point.Empty,
-        //scrollView.AutoHideScrollBars = true;
-        //scrollView.ShowVerticalScrollIndicator = true;
-        //scrollView.ShowHorizontalScrollIndicator = true;
+        var arrangementEditor = new ArrangementEditor ()
+        {
+            X = Pos.AnchorEnd (),
+            Y = 0,
+            AutoSelectViewToEdit = true,
+        };
+        app.Add (arrangementEditor);
 
-        //var embedded1 = new View
-        //{
-        //    Title = "1",
-        //    X = 3,
-        //    Y = 3,
-        //    Width = Dim.Fill (3),
-        //    Height = Dim.Fill (3),
-        //    ColorScheme = Colors.ColorSchemes ["Dialog"],
-        //    Id = "1",
-        //    BorderStyle = LineStyle.Rounded,
-        //    Arrangement = ViewArrangement.Movable
-        //};
+        View tiledView1 = CreateTiledView (1, 0, 0);
 
-        //var embedded2 = new View
-        //{
-        //    Title = "2",
-        //    X = 3,
-        //    Y = 3,
-        //    Width = Dim.Fill (3),
-        //    Height = Dim.Fill (3),
-        //    ColorScheme = Colors.ColorSchemes ["Error"],
-        //    Id = "2",
-        //    BorderStyle = LineStyle.Rounded,
-        //    Arrangement = ViewArrangement.Movable
-        //};
-        //embedded1.Add (embedded2);
+        tiledView1.Width = 30;
+
+        ProgressBar tiledProgressBar1 = new ()
+        {
+            X = 0,
+            Y = Pos.AnchorEnd (),
+            Width = Dim.Fill (),
+            Id = "tiledProgressBar",
+            BidirectionalMarquee = true,
+        };
+        tiledView1.Add (tiledProgressBar1);
+
+        View tiledView2 = CreateTiledView (2, 4, 2);
+
+        ProgressBar tiledProgressBar2 = new ()
+        {
+            X = 0,
+            Y = Pos.AnchorEnd (),
+            Width = Dim.Fill (),
+            Id = "tiledProgressBar",
+            BidirectionalMarquee = true,
+            ProgressBarStyle = ProgressBarStyle.MarqueeBlocks
+            // BorderStyle = LineStyle.Rounded
+        };
+        tiledView2.Add (tiledProgressBar2);
 
-        //var embedded3 = new View
+        app.Add (tiledView1);
+        app.Add (tiledView2);
+
+        View tiledView3 = CreateTiledView (3, 8, 4);
+        app.Add (tiledView3);
+
+        // View overlappedView1 = CreateOverlappedView (1, 30, 2);
+
+        //ProgressBar progressBar = new ()
         //{
-        //    Title = "3",
-        //    X = 3,
-        //    Y = 3,
-        //    Width = Dim.Fill (3),
-        //    Height = Dim.Fill (3),
-        //    ColorScheme = Colors.ColorSchemes ["TopLevel"],
-        //    Id = "3",
-        //    BorderStyle = LineStyle.Rounded,
-        //    Arrangement = ViewArrangement.Movable
+        //    X = Pos.AnchorEnd (),
+        //    Y = Pos.AnchorEnd (),
+        //    Width = Dim.Fill (),
+        //    Id = "progressBar",
+        //    BorderStyle = LineStyle.Rounded
         //};
+        //overlappedView1.Add (progressBar);
+
 
-        //var testButton = new Button { X = 2, Y = 2, Text = "click me" };
-        //testButton.Accepting += (s, e) => { MessageBox.Query (10, 5, "Test", "test message", "Ok"); };
-        //embedded3.Add (testButton);
-        //embedded2.Add (embedded3);
+        //View overlappedView2 = CreateOverlappedView (2, 32, 4);
+        //View overlappedView3 = CreateOverlappedView (3, 34, 6);
 
-        //scrollView.Add (embedded1);
+        //app.Add (overlappedView1);
+        //app.Add (overlappedView2);
+        //app.Add (overlappedView3);
 
-        //win.Add (scrollView);
+        Timer progressTimer = new Timer (150)
+        {
+            AutoReset = true
+        };
 
-        Application.Run (win);
-        win.Dispose ();
+        progressTimer.Elapsed += (s, e) =>
+                                 {
+                                     tiledProgressBar1.Pulse ();
+                                     tiledProgressBar2.Pulse ();
+                                     Application.Wakeup ();
+                                 };
+
+        progressTimer.Start ();
+        Application.Run (app);
+        progressTimer.Stop ();
+        app.Dispose ();
         Application.Shutdown ();
+
+        return;
     }
 
-    public override List<Key> GetDemoKeyStrokes ()
+    private View CreateOverlappedView (int id, Pos x, Pos y)
     {
-        var keys = new List<Key> ();
-
-        for (int i = 0; i < 25; i++)
+        var overlapped = new View
         {
-            keys.Add (Key.CursorDown);
-        }
+            X = x,
+            Y = y,
+            Height = Dim.Auto (minimumContentDim: 4),
+            Width = Dim.Auto (minimumContentDim: 14),
+            Title = $"Overlapped{id} _{GetNextHotKey ()}",
+            ColorScheme = Colors.ColorSchemes ["Toplevel"],
+            Id = $"Overlapped{id}",
+            ShadowStyle = ShadowStyle.Transparent,
+            BorderStyle = LineStyle.Double,
+            CanFocus = true, // Can't drag without this? BUGBUG
+            TabStop = TabBehavior.TabGroup,
+            Arrangement = ViewArrangement.Movable | ViewArrangement.Overlapped | ViewArrangement.Resizable
+        };
+        return overlapped;
+    }
 
-        for (int i = 0; i < 25; i++)
+    private View CreateTiledView (int id, Pos x, Pos y)
+    {
+        var tiled = new View
         {
-            keys.Add (Key.CursorRight);
-        }
+            X = x,
+            Y = y,
+            Height = Dim.Auto (minimumContentDim: 8),
+            Width = Dim.Auto (minimumContentDim: 15),
+            Title = $"Tiled{id} _{GetNextHotKey ()}",
+            Id = $"Tiled{id}",
+            Text = $"Tiled{id}",
+            BorderStyle = LineStyle.Single,
+            CanFocus = true, // Can't drag without this? BUGBUG
+            TabStop = TabBehavior.TabStop,
+            Arrangement = ViewArrangement.Movable | ViewArrangement.Resizable,
+            ShadowStyle = ShadowStyle.Transparent,
+        };
+        //tiled.Padding.Thickness = new (1);
+        //tiled.Padding.Diagnostics =  ViewDiagnosticFlags.Thickness;
 
-        for (int i = 0; i < 25; i++)
-        {
-            keys.Add (Key.CursorLeft);
-        }
+        //tiled.Margin.Thickness = new (1);
 
-        for (int i = 0; i < 25; i++)
+        FrameView fv = new ()
         {
-            keys.Add (Key.CursorUp);
-        }
+            Title = "FrameView",
+            Width = 15,
+            Height = 3,
+        };
+        tiled.Add (fv);
 
-        return keys;
+        return tiled;
     }
+
+    private char GetNextHotKey () { return (char)('A' + _hotkeyCount++); }
 }

+ 1 - 1
UICatalog/Scenarios/Editor.cs

@@ -262,7 +262,7 @@ public class Editor : Scenario
             AlignmentModes = AlignmentModes.StartToEnd | AlignmentModes.IgnoreFirstOrLast
         };
 
-        _textView.VerticalScrollBar.AutoHide = false;
+        _textView.VerticalScrollBar.AutoShow = false;
         _textView.UnwrappedCursorPosition += (s, e) =>
                                              {
                                                  siCursorPosition.Title = $"Ln {e.Point.Y + 1}, Col {e.Point.X + 1}";

+ 2 - 2
UICatalog/Scenarios/Editors/EventLog.cs

@@ -39,8 +39,8 @@ public class EventLog : ListView
 
         Initialized += EventLog_Initialized;
 
-        HorizontalScrollBar.AutoHide = true;
-        VerticalScrollBar.AutoHide = true;
+        HorizontalScrollBar.AutoShow = true;
+        VerticalScrollBar.AutoShow = true;
 
         AddCommand (Command.DeleteAll,
                    () =>

+ 1 - 1
UICatalog/Scenarios/HexEditor.cs

@@ -44,7 +44,7 @@ public class HexEditor : Scenario
         _hexView.Arrangement = ViewArrangement.Resizable;
         _hexView.Edited += _hexView_Edited;
         _hexView.PositionChanged += _hexView_PositionChanged;
-        _hexView.VerticalScrollBar.AutoHide = false;
+        _hexView.VerticalScrollBar.AutoShow = false;
 
         app.Add (_hexView);
 

+ 51 - 71
UICatalog/Scenarios/ListViewWithSelection.cs

@@ -10,19 +10,20 @@ using Terminal.Gui;
 
 namespace UICatalog.Scenarios;
 
-[ScenarioMetadata ("List View With Selection", "ListView with columns and selection")]
+[ScenarioMetadata ("List View With Selection", "ListView with custom rendering, columns, and selection")]
 [ScenarioCategory ("Controls")]
 [ScenarioCategory ("ListView")]
+[ScenarioCategory ("Scrolling")]
 public class ListViewWithSelection : Scenario
 {
-    private CheckBox _allowMarkingCB;
-    private CheckBox _allowMultipleCB;
-    private CheckBox _customRenderCB;
+    private CheckBox _allowMarkingCb;
+    private CheckBox _allowMultipleCb;
+    private CheckBox _customRenderCb;
+    private CheckBox _keep;
     private ListView _listView;
     private ObservableCollection<Scenario> _scenarios;
     private Window _appWindow;
 
-
     private ObservableCollection<string> _eventList = new ();
     private ListView _eventListView;
 
@@ -38,90 +39,54 @@ public class ListViewWithSelection : Scenario
 
         _scenarios = GetScenarios ();
 
-        _customRenderCB = new CheckBox { X = 0, Y = 0, Text = "Use custom _rendering" };
-        _appWindow.Add (_customRenderCB);
-        _customRenderCB.CheckedStateChanging += _customRenderCB_Toggle;
+        _customRenderCb = new CheckBox { X = 0, Y = 0, Text = "Custom _Rendering" };
+        _appWindow.Add (_customRenderCb);
+        _customRenderCb.CheckedStateChanging += CustomRenderCB_Toggle;
 
-        _allowMarkingCB = new CheckBox
+        _allowMarkingCb = new CheckBox
         {
-            X = Pos.Right (_customRenderCB) + 1, Y = 0, Text = "Allow _Marking", AllowCheckStateNone = false
+            X = Pos.Right (_customRenderCb) + 1,
+            Y = 0,
+            Text = "Allows_Marking",
+            AllowCheckStateNone = false
         };
-        _appWindow.Add (_allowMarkingCB);
-        _allowMarkingCB.CheckedStateChanging += AllowMarkingCB_Toggle;
+        _appWindow.Add (_allowMarkingCb);
+        _allowMarkingCb.CheckedStateChanging += AllowsMarkingCB_Toggle;
 
-        _allowMultipleCB = new CheckBox
+        _allowMultipleCb = new CheckBox
         {
-            X = Pos.Right (_allowMarkingCB) + 1,
+            X = Pos.Right (_allowMarkingCb) + 1,
             Y = 0,
-            Visible = _allowMarkingCB.CheckedState == CheckState.Checked,
-            Text = "Allow Multi-_Select"
+            Enabled = _allowMarkingCb.CheckedState == CheckState.Checked,
+            Text = "AllowsMulti_Select"
         };
-        _appWindow.Add (_allowMultipleCB);
-        _allowMultipleCB.CheckedStateChanging += AllowMultipleCB_Toggle;
+        _appWindow.Add (_allowMultipleCb);
+        _allowMultipleCb.CheckedStateChanging += AllowsMultipleSelectionCB_Toggle;
+
+        _keep = new CheckBox
+        {
+            X = Pos.Right (_allowMultipleCb) + 1,
+            Y = 0,
+            Text = "Allow_YGreaterThanContentHeight"
+        };
+        _appWindow.Add (_keep);
+        _keep.CheckedStateChanging += AllowYGreaterThanContentHeightCB_Toggle;
 
         _listView = new ListView
         {
             Title = "_ListView",
             X = 0,
-            Y = Pos.Bottom(_allowMarkingCB),
+            Y = Pos.Bottom (_allowMarkingCb),
             Width = Dim.Func (() => _listView?.MaxLength ?? 10),
             Height = Dim.Fill (),
             AllowsMarking = false,
             AllowsMultipleSelection = false
         };
-        //_listView.Border.Thickness = new Thickness (0, 1, 0, 0);
         _listView.RowRender += ListView_RowRender;
         _appWindow.Add (_listView);
 
-        //var scrollBar = new ScrollBarView (_listView, true);
-
-        //scrollBar.ChangedPosition += (s, e) =>
-        //{
-        //    _listView.TopItem = scrollBar.Position;
-
-        //    if (_listView.TopItem != scrollBar.Position)
-        //    {
-        //        scrollBar.Position = _listView.TopItem;
-        //    }
-
-        //    _listView.SetNeedsDraw ();
-        //};
-
-        //scrollBar.OtherScrollBarView.ChangedPosition += (s, e) =>
-        //{
-        //    _listView.LeftItem = scrollBar.OtherScrollBarView.Position;
-
-        //    if (_listView.LeftItem != scrollBar.OtherScrollBarView.Position)
-        //    {
-        //        scrollBar.OtherScrollBarView.Position = _listView.LeftItem;
-        //    }
-
-        //    _listView.SetNeedsDraw ();
-        //};
-
-        //_listView.DrawingContent += (s, e) =>
-        //{
-        //    scrollBar.Size = _listView.Source.Count;
-        //    scrollBar.Position = _listView.TopItem;
-        //    scrollBar.OtherScrollBarView.Size = _listView.MaxLength;
-        //    scrollBar.OtherScrollBarView.Position = _listView.LeftItem;
-        //    scrollBar.Refresh ();
-        //};
-
         _listView.SetSource (_scenarios);
 
-        var k = "_Keep Content Always In Viewport";
-
-        var keepCheckBox = new CheckBox
-        {
-            X = Pos.Right(_allowMultipleCB) + 1,
-            Y = 0, 
-            Text = k, 
-            //CheckedState = scrollBar.AutoHideScrollBars ? CheckState.Checked : CheckState.UnChecked
-        };
-        //keepCheckBox.CheckedStateChanging += (s, e) => scrollBar.KeepContentAlwaysInViewport = e.NewValue == CheckState.Checked;
-        _appWindow.Add (keepCheckBox);
-
         _eventList = new ();
 
         _eventListView = new ListView
@@ -140,6 +105,7 @@ public class ListViewWithSelection : Scenario
         _listView.CollectionChanged += (s, a) => LogEvent (s as View, a, "CollectionChanged");
         _listView.Accepting += (s, a) => LogEvent (s as View, a, "Accept");
         _listView.Selecting += (s, a) => LogEvent (s as View, a, "Select");
+        _listView.VerticalScrollBar.AutoShow = true;
 
         bool? LogEvent (View sender, EventArgs args, string message)
         {
@@ -155,7 +121,7 @@ public class ListViewWithSelection : Scenario
         Application.Shutdown ();
     }
 
-    private void _customRenderCB_Toggle (object sender, CancelEventArgs<CheckState> stateEventArgs)
+    private void CustomRenderCB_Toggle (object sender, CancelEventArgs<CheckState> stateEventArgs)
     {
         if (stateEventArgs.CurrentValue == CheckState.Checked)
         {
@@ -169,19 +135,33 @@ public class ListViewWithSelection : Scenario
         _appWindow.SetNeedsDraw ();
     }
 
-    private void AllowMarkingCB_Toggle (object sender, [NotNull] CancelEventArgs<CheckState> stateEventArgs)
+    private void AllowsMarkingCB_Toggle (object sender, [NotNull] CancelEventArgs<CheckState> stateEventArgs)
     {
         _listView.AllowsMarking = stateEventArgs.NewValue == CheckState.Checked;
-        _allowMultipleCB.Visible = _listView.AllowsMarking;
+        _allowMultipleCb.Enabled = _listView.AllowsMarking;
         _appWindow.SetNeedsDraw ();
     }
 
-    private void AllowMultipleCB_Toggle (object sender, [NotNull] CancelEventArgs<CheckState> stateEventArgs)
+    private void AllowsMultipleSelectionCB_Toggle (object sender, [NotNull] CancelEventArgs<CheckState> stateEventArgs)
     {
         _listView.AllowsMultipleSelection = stateEventArgs.NewValue == CheckState.Checked;
         _appWindow.SetNeedsDraw ();
     }
 
+
+    private void AllowYGreaterThanContentHeightCB_Toggle (object sender, [NotNull] CancelEventArgs<CheckState> stateEventArgs)
+    {
+        if (stateEventArgs.NewValue == CheckState.Checked)
+        {
+            _listView.ViewportSettings |= Terminal.Gui.ViewportSettings.AllowYGreaterThanContentHeight;
+        }
+        else
+        {
+            _listView.ViewportSettings &= ~Terminal.Gui.ViewportSettings.AllowYGreaterThanContentHeight;
+        }
+        _appWindow.SetNeedsDraw ();
+    }
+
     private void ListView_RowRender (object sender, ListViewRowEventArgs obj)
     {
         if (obj.Row == _listView.SelectedItem)

+ 45 - 44
UICatalog/Scenarios/ScrollBarDemo.cs

@@ -35,7 +35,7 @@ public class ScrollBarDemo : Scenario
         var scrollBar = new ScrollBar
         {
             X = Pos.AnchorEnd () - 5,
-            AutoHide = false,
+            AutoShow = false,
             ScrollableContentSize = 100,
             Height = Dim.Fill()
         };
@@ -158,7 +158,7 @@ public class ScrollBarDemo : Scenario
 
         var lblSize = new Label
         {
-            Text = "_Content Size:",
+            Text = "Scrollable_ContentSize:",
             TextAlignment = Alignment.End,
             Y = Pos.Align (Alignment.Start, groupId: 1),
             Width = Dim.Func (() => GetMaxLabelWidth (1))
@@ -191,7 +191,7 @@ public class ScrollBarDemo : Scenario
 
         var lblVisibleContentSize = new Label
         {
-            Text = "_VisibleContentSize::",
+            Text = "_VisibleContentSize:",
             TextAlignment = Alignment.End,
             Y = Pos.Align (Alignment.Start, groupId: 1),
             Width = Dim.Func (() => GetMaxLabelWidth (1))
@@ -221,38 +221,6 @@ public class ScrollBarDemo : Scenario
                                                }
                                            };
 
-        var lblSliderPosition = new Label
-        {
-            Text = "_SliderPosition:",
-            TextAlignment = Alignment.End,
-            Y = Pos.Align (Alignment.Start, groupId: 1),
-            Width = Dim.Func (() => GetMaxLabelWidth (1))
-        };
-        demoFrame.Add (lblSliderPosition);
-
-        Label scrollSliderPosition = new ()
-        {
-            Text = scrollBar.GetSliderPosition ().ToString (),
-            X = Pos.Right (lblSliderPosition) + 1,
-            Y = Pos.Top (lblSliderPosition)
-        };
-        demoFrame.Add (scrollSliderPosition);
-
-        var lblScrolled = new Label
-        {
-            Text = "_Scrolled:",
-            TextAlignment = Alignment.End,
-            Y = Pos.Align (Alignment.Start, groupId: 1),
-            Width = Dim.Func (() => GetMaxLabelWidth (1))
-
-        };
-        demoFrame.Add (lblScrolled);
-        Label scrolled = new ()
-        {
-            X = Pos.Right (lblScrolled) + 1,
-            Y = Pos.Top (lblScrolled)
-        };
-        demoFrame.Add (scrolled);
 
         var lblPosition = new Label
         {
@@ -294,35 +262,68 @@ public class ScrollBarDemo : Scenario
 
         var lblOptions = new Label
         {
-            Text = "_Options:",
+            Text = "Options:",
             TextAlignment = Alignment.End,
             Y = Pos.Align (Alignment.Start, groupId: 1),
             Width = Dim.Func (() => GetMaxLabelWidth (1))
         };
         demoFrame.Add (lblOptions);
-        var ckbAutoHide = new CheckBox
+        var autoShow = new CheckBox
         {
             Y = Pos.Top (lblOptions),
             X = Pos.Right (lblOptions) + 1,
-            Text = $"Auto_Hide",
-            CheckedState = scrollBar.AutoHide ? CheckState.Checked : CheckState.UnChecked
+            Text = $"_AutoShow",
+            CheckedState = scrollBar.AutoShow ? CheckState.Checked : CheckState.UnChecked
         };
-        ckbAutoHide.CheckedStateChanging += (s, e) => scrollBar.AutoHide = e.NewValue == CheckState.Checked;
-        demoFrame.Add (ckbAutoHide);
+        autoShow.CheckedStateChanging += (s, e) => scrollBar.AutoShow = e.NewValue == CheckState.Checked;
+        demoFrame.Add (autoShow);
 
         var ckbShowPercent = new CheckBox
         {
             Y = Pos.Top (lblOptions),
-            X = Pos.Right (ckbAutoHide) + 1,
-            Text = "Sho_wPercent",
+            X = Pos.Right (autoShow) + 1,
+            Text = "ShowP_ercent",
             CheckedState = scrollBar.ShowPercent ? CheckState.Checked : CheckState.UnChecked
         };
         ckbShowPercent.CheckedStateChanging += (s, e) => scrollBar.ShowPercent = e.NewValue == CheckState.Checked;
         demoFrame.Add (ckbShowPercent);
 
+        var lblSliderPosition = new Label
+        {
+            Text = "SliderPosition:",
+            TextAlignment = Alignment.End,
+            Y = Pos.Align (Alignment.Start, groupId: 1),
+            Width = Dim.Func (() => GetMaxLabelWidth (1))
+        };
+        demoFrame.Add (lblSliderPosition);
+
+        Label scrollSliderPosition = new ()
+        {
+            Text = scrollBar.GetSliderPosition ().ToString (),
+            X = Pos.Right (lblSliderPosition) + 1,
+            Y = Pos.Top (lblSliderPosition)
+        };
+        demoFrame.Add (scrollSliderPosition);
+
+        var lblScrolled = new Label
+        {
+            Text = "Scrolled:",
+            TextAlignment = Alignment.End,
+            Y = Pos.Align (Alignment.Start, groupId: 1),
+            Width = Dim.Func (() => GetMaxLabelWidth (1))
+
+        };
+        demoFrame.Add (lblScrolled);
+        Label scrolled = new ()
+        {
+            X = Pos.Right (lblScrolled) + 1,
+            Y = Pos.Top (lblScrolled)
+        };
+        demoFrame.Add (scrolled);
+
         var lblScrollFrame = new Label
         {
-            Y = Pos.Bottom (lblOptions) + 1
+            Y = Pos.Bottom (lblScrolled) + 1
         };
         demoFrame.Add (lblScrollFrame);
 

+ 18 - 10
UICatalog/Scenarios/Scrolling.cs

@@ -50,7 +50,7 @@ public class Scrolling : Scenario
         {
             X = Pos.X (demoView),
             Y = Pos.Bottom (demoView),
-            Text = "Horizontal Scrollbar",
+            Text = "_HorizontalScrollBar.Visible",
             CheckedState = demoView.HorizontalScrollBar.Visible ? CheckState.Checked : CheckState.UnChecked
         };
         app.Add (hCheckBox);
@@ -67,7 +67,7 @@ public class Scrolling : Scenario
         {
             X = Pos.Right (hCheckBox) + 3,
             Y = Pos.Bottom (demoView),
-            Text = "Vertical Scrollbar",
+            Text = "_VerticalScrollBar.Visible",
             CheckedState = demoView.VerticalScrollBar.Visible ? CheckState.Checked : CheckState.UnChecked
         };
         app.Add (vCheckBox);
@@ -76,23 +76,31 @@ public class Scrolling : Scenario
                                              demoView.VerticalScrollBar.Visible = args.CurrentValue == CheckState.Checked;
                                          };
 
-        var t = "Auto Hide Scrollbars";
-
         var ahCheckBox = new CheckBox
         {
-            X = Pos.Left (demoView), Y = Pos.Bottom (hCheckBox), Text = t,
-            CheckedState = demoView.HorizontalScrollBar.AutoHide ? CheckState.Checked : CheckState.UnChecked
+            X = Pos.Left (demoView),
+            Y = Pos.Bottom (hCheckBox),
+            Text = "_AutoHide (both)",
+            CheckedState = demoView.HorizontalScrollBar.AutoShow ? CheckState.Checked : CheckState.UnChecked
         };
 
         ahCheckBox.CheckedStateChanging += (s, e) =>
                               {
-                                  demoView.HorizontalScrollBar.AutoHide = e.NewValue == CheckState.Checked;
-                                  demoView.VerticalScrollBar.AutoHide = e.NewValue == CheckState.Checked;
-                                  hCheckBox.CheckedState = CheckState.Checked;
-                                  vCheckBox.CheckedState = CheckState.Checked;
+                                  demoView.HorizontalScrollBar.AutoShow = e.NewValue == CheckState.Checked;
+                                  demoView.VerticalScrollBar.AutoShow = e.NewValue == CheckState.Checked;
                               };
         app.Add (ahCheckBox);
 
+        demoView.VerticalScrollBar.VisibleChanging += (sender, args) =>
+                                                     {
+                                                         vCheckBox.CheckedState = args.NewValue ? CheckState.Checked : CheckState.UnChecked; 
+                                                     };
+
+        demoView.HorizontalScrollBar.VisibleChanging += (sender, args) =>
+                                                      {
+                                                          hCheckBox.CheckedState = args.NewValue ? CheckState.Checked : CheckState.UnChecked;
+                                                      };
+
         var count = 0;
 
         var mousePos = new Label

+ 1 - 1
UICatalog/Scenarios/TreeViewFileSystem.cs

@@ -182,7 +182,7 @@ public class TreeViewFileSystem : Scenario
         _treeViewFiles = new TreeView<IFileSystemInfo> { X = 0, Y = 0, Width = Dim.Percent (50), Height = Dim.Fill () };
         _treeViewFiles.DrawLine += TreeViewFiles_DrawLine;
 
-        _treeViewFiles.VerticalScrollBar.AutoHide = false;
+        _treeViewFiles.VerticalScrollBar.AutoShow = false;
 
         _detailsFrame = new DetailsFrame (_iconProvider)
         {

+ 80 - 128
UICatalog/Scenarios/ContentScrolling.cs → UICatalog/Scenarios/ViewportSettings.cs

@@ -5,14 +5,13 @@ using Terminal.Gui;
 
 namespace UICatalog.Scenarios;
 
-[ScenarioMetadata ("Content Scrolling", "Demonstrates using View.Viewport and View.GetContentSize () to scroll content.")]
+[ScenarioMetadata ("ViewportSettings", "Demonstrates manipulating Viewport, ViewportSettings, and ContentSize to scroll content.")]
 [ScenarioCategory ("Layout")]
 [ScenarioCategory ("Drawing")]
 [ScenarioCategory ("Scrolling")]
-public class ContentScrolling : Scenario
+[ScenarioCategory ("Adornments")]
+public class ViewportSettings : Scenario
 {
-    private ViewDiagnosticFlags _diagnosticFlags;
-
     public class ScrollingDemoView : FrameView
     {
         public ScrollingDemoView ()
@@ -20,17 +19,17 @@ public class ContentScrolling : Scenario
             Id = "ScrollingDemoView";
             Width = Dim.Fill ();
             Height = Dim.Fill ();
-            ColorScheme = Colors.ColorSchemes ["Base"];
+            base.ColorScheme = Colors.ColorSchemes ["Base"];
 
-            Text =
+            base.Text =
                 "Text (ScrollingDemoView.Text). This is long text.\nThe second line.\n3\n4\n5th line\nLine 6. This is a longer line that should wrap automatically.";
             CanFocus = true;
             BorderStyle = LineStyle.Rounded;
-            Arrangement = ViewArrangement.Fixed;
+            Arrangement = ViewArrangement.Resizable;
 
             SetContentSize (new (60, 40));
-            ViewportSettings |= ViewportSettings.ClearContentOnly;
-            ViewportSettings |= ViewportSettings.ClipContentOnly;
+            ViewportSettings |= Terminal.Gui.ViewportSettings.ClearContentOnly;
+            ViewportSettings |= Terminal.Gui.ViewportSettings.ClipContentOnly;
 
             // Things this view knows how to do
             AddCommand (Command.ScrollDown, () => ScrollVertical (1));
@@ -47,7 +46,8 @@ public class ContentScrolling : Scenario
 
             // Add a status label to the border that shows Viewport and ContentSize values. Bit of a hack.
             // TODO: Move to Padding with controls
-            Border.Add (new Label { X = 20 });
+            Border?.Add (new Label { X = 20 });
+
             ViewportChanged += VirtualDemoView_LayoutComplete;
 
             MouseEvent += VirtualDemoView_MouseEvent;
@@ -84,7 +84,7 @@ public class ContentScrolling : Scenario
 
         private void VirtualDemoView_LayoutComplete (object sender, DrawEventArgs drawEventArgs)
         {
-            Label frameLabel = Padding.Subviews.OfType<Label> ().FirstOrDefault ();
+            Label frameLabel = Padding?.Subviews.OfType<Label> ().FirstOrDefault ();
 
             if (frameLabel is { })
             {
@@ -97,8 +97,6 @@ public class ContentScrolling : Scenario
     {
         Application.Init ();
 
-        _diagnosticFlags = View.Diagnostics;
-
         Window app = new ()
         {
             Title = GetQuitKeyAndName (),
@@ -125,7 +123,7 @@ public class ContentScrolling : Scenario
         app.Add (view);
 
         // Add Scroll Setting UI to Padding
-        view.Padding.Thickness = view.Padding.Thickness with { Top = view.Padding.Thickness.Top + 6 };
+        view.Padding!.Thickness = view.Padding.Thickness with { Top = view.Padding.Thickness.Top + 6 };
         view.Padding.CanFocus = true;
 
         Label frameLabel = new ()
@@ -142,7 +140,7 @@ public class ContentScrolling : Scenario
             Y = Pos.Bottom (frameLabel),
             CanFocus = true
         };
-        cbAllowNegativeX.CheckedState = view.ViewportSettings.HasFlag  (ViewportSettings.AllowNegativeX) ? CheckState.Checked : CheckState.UnChecked;
+        cbAllowNegativeX.CheckedState = view.ViewportSettings.HasFlag  (Terminal.Gui.ViewportSettings.AllowNegativeX) ? CheckState.Checked : CheckState.UnChecked;
 
         view.Padding.Add (cbAllowNegativeX);
 
@@ -153,7 +151,7 @@ public class ContentScrolling : Scenario
             Y = Pos.Bottom (frameLabel),
             CanFocus = true,
         };
-        cbAllowNegativeY.CheckedState = view.ViewportSettings.HasFlag  (ViewportSettings.AllowNegativeY) ? CheckState.Checked : CheckState.UnChecked;
+        cbAllowNegativeY.CheckedState = view.ViewportSettings.HasFlag  (Terminal.Gui.ViewportSettings.AllowNegativeY) ? CheckState.Checked : CheckState.UnChecked;
 
         view.Padding.Add (cbAllowNegativeY);
 
@@ -163,36 +161,32 @@ public class ContentScrolling : Scenario
             Y = Pos.Bottom (cbAllowNegativeX),
             CanFocus = true
         };
-        cbAllowXGreaterThanContentWidth.CheckedState = view.ViewportSettings.HasFlag  (ViewportSettings.AllowXGreaterThanContentWidth) ? CheckState.Checked : CheckState.UnChecked;
+        cbAllowXGreaterThanContentWidth.CheckedState = view.ViewportSettings.HasFlag  (Terminal.Gui.ViewportSettings.AllowXGreaterThanContentWidth) ? CheckState.Checked : CheckState.UnChecked;
 
         view.Padding.Add (cbAllowXGreaterThanContentWidth);
 
-        void AllowNegativeX_Toggle (object sender, CancelEventArgs<CheckState> e)
+        void AllowNegativeXToggle (object sender, CancelEventArgs<CheckState> e)
         {
             if (e.NewValue == CheckState.Checked)
             {
-                view.ViewportSettings |= ViewportSettings.AllowNegativeX;
+                view.ViewportSettings |= Terminal.Gui.ViewportSettings.AllowNegativeX;
             }
             else
             {
-                view.ViewportSettings &= ~ViewportSettings.AllowNegativeX;
+                view.ViewportSettings &= ~Terminal.Gui.ViewportSettings.AllowNegativeX;
             }
-
-            SetHorizontalScrollBar (e.NewValue, cbAllowXGreaterThanContentWidth.CheckedState);
         }
 
-        void AllowXGreaterThanContentWidth_Toggle (object sender, CancelEventArgs<CheckState> e)
+        void AllowXGreaterThanContentWidthToggle (object sender, CancelEventArgs<CheckState> e)
         {
             if (e.NewValue == CheckState.Checked)
             {
-                view.ViewportSettings |= ViewportSettings.AllowXGreaterThanContentWidth;
+                view.ViewportSettings |= Terminal.Gui.ViewportSettings.AllowXGreaterThanContentWidth;
             }
             else
             {
-                view.ViewportSettings &= ~ViewportSettings.AllowXGreaterThanContentWidth;
+                view.ViewportSettings &= ~Terminal.Gui.ViewportSettings.AllowXGreaterThanContentWidth;
             }
-
-            SetHorizontalScrollBar (e.NewValue, cbAllowNegativeX.CheckedState);
         }
 
         var cbAllowYGreaterThanContentHeight = new CheckBox
@@ -202,41 +196,37 @@ public class ContentScrolling : Scenario
             Y = Pos.Bottom (cbAllowNegativeX),
             CanFocus = true
         };
-        cbAllowYGreaterThanContentHeight.CheckedState = view.ViewportSettings.HasFlag  (ViewportSettings.AllowYGreaterThanContentHeight) ? CheckState.Checked : CheckState.UnChecked;
+        cbAllowYGreaterThanContentHeight.CheckedState = view.ViewportSettings.HasFlag  (Terminal.Gui.ViewportSettings.AllowYGreaterThanContentHeight) ? CheckState.Checked : CheckState.UnChecked;
 
         view.Padding.Add (cbAllowYGreaterThanContentHeight);
 
-        void AllowNegativeY_Toggle (object sender, CancelEventArgs<CheckState> e)
+        void AllowNegativeYToggle (object sender, CancelEventArgs<CheckState> e)
         {
             if (e.NewValue == CheckState.Checked)
             {
-                view.ViewportSettings |= ViewportSettings.AllowNegativeY;
+                view.ViewportSettings |= Terminal.Gui.ViewportSettings.AllowNegativeY;
             }
             else
             {
-                view.ViewportSettings &= ~ViewportSettings.AllowNegativeY;
+                view.ViewportSettings &= ~Terminal.Gui.ViewportSettings.AllowNegativeY;
             }
-
-            SetVerticalScrollBar (e.NewValue, cbAllowYGreaterThanContentHeight.CheckedState);
         }
 
-        void AllowYGreaterThanContentHeight_Toggle (object sender, CancelEventArgs<CheckState> e)
+        void AllowYGreaterThanContentHeightToggle (object sender, CancelEventArgs<CheckState> e)
         {
             if (e.NewValue == CheckState.Checked)
             {
-                view.ViewportSettings |= ViewportSettings.AllowYGreaterThanContentHeight;
+                view.ViewportSettings |= Terminal.Gui.ViewportSettings.AllowYGreaterThanContentHeight;
             }
             else
             {
-                view.ViewportSettings &= ~ViewportSettings.AllowYGreaterThanContentHeight;
+                view.ViewportSettings &= ~Terminal.Gui.ViewportSettings.AllowYGreaterThanContentHeight;
             }
-
-            SetVerticalScrollBar (e.NewValue, cbAllowNegativeY.CheckedState);
         }
 
         var labelContentSize = new Label
         {
-            Title = "_ContentSize:",
+            Title = "ContentSi_ze:",
             Y = Pos.Bottom (cbAllowYGreaterThanContentHeight)
         };
 
@@ -247,9 +237,9 @@ public class ContentScrolling : Scenario
             Y = Pos.Top (labelContentSize),
             CanFocus = true
         };
-        contentSizeWidth.ValueChanging += ContentSizeWidth_ValueChanged;
+        contentSizeWidth.ValueChanging += ContentSizeWidthValueChanged;
 
-        void ContentSizeWidth_ValueChanged (object sender, CancelEventArgs<int> e)
+        void ContentSizeWidthValueChanged (object sender, CancelEventArgs<int> e)
         {
             if (e.NewValue < 0)
             {
@@ -275,9 +265,9 @@ public class ContentScrolling : Scenario
             Y = Pos.Top (labelContentSize),
             CanFocus = true
         };
-        contentSizeHeight.ValueChanging += ContentSizeHeight_ValueChanged;
+        contentSizeHeight.ValueChanging += ContentSizeHeightValueChanged;
 
-        void ContentSizeHeight_ValueChanged (object sender, CancelEventArgs<int> e)
+        void ContentSizeHeightValueChanged (object sender, CancelEventArgs<int> e)
         {
             if (e.NewValue < 0)
             {
@@ -291,159 +281,123 @@ public class ContentScrolling : Scenario
 
         var cbClearContentOnly = new CheckBox
         {
-            Title = "ClearContentOnly",
+            Title = "C_learContentOnly",
             X = Pos.Right (contentSizeHeight) + 1,
             Y = Pos.Top (labelContentSize),
             CanFocus = true
         };
-        cbClearContentOnly.CheckedState = view.ViewportSettings.HasFlag (ViewportSettings.ClearContentOnly) ? CheckState.Checked : CheckState.UnChecked;
-        cbClearContentOnly.CheckedStateChanging += ClearContentOnly_Toggle;
+        cbClearContentOnly.CheckedState = view.ViewportSettings.HasFlag (Terminal.Gui.ViewportSettings.ClearContentOnly) ? CheckState.Checked : CheckState.UnChecked;
+        cbClearContentOnly.CheckedStateChanging += ClearContentOnlyToggle;
 
-        void ClearContentOnly_Toggle (object sender, CancelEventArgs<CheckState> e)
+        void ClearContentOnlyToggle (object sender, CancelEventArgs<CheckState> e)
         {
             if (e.NewValue == CheckState.Checked)
             {
-                view.ViewportSettings |= ViewportSettings.ClearContentOnly;
+                view.ViewportSettings |= Terminal.Gui.ViewportSettings.ClearContentOnly;
             }
             else
             {
-                view.ViewportSettings &= ~ViewportSettings.ClearContentOnly;
+                view.ViewportSettings &= ~Terminal.Gui.ViewportSettings.ClearContentOnly;
             }
         }
 
         var cbClipContentOnly = new CheckBox
         {
-            Title = "ClipContentOnly",
+            Title = "_ClipContentOnly",
             X = Pos.Right (cbClearContentOnly) + 1,
             Y = Pos.Top (labelContentSize),
             CanFocus = true
         };
-        cbClipContentOnly.CheckedState = view.ViewportSettings.HasFlag (ViewportSettings.ClipContentOnly) ? CheckState.Checked : CheckState.UnChecked;
-        cbClipContentOnly.CheckedStateChanging += ClipContentOnlyOnly_Toggle;
+        cbClipContentOnly.CheckedState = view.ViewportSettings.HasFlag (Terminal.Gui.ViewportSettings.ClipContentOnly) ? CheckState.Checked : CheckState.UnChecked;
+        cbClipContentOnly.CheckedStateChanging += ClipContentOnlyOnlyToggle;
 
-        void ClipContentOnlyOnly_Toggle (object sender, CancelEventArgs<CheckState> e)
+        void ClipContentOnlyOnlyToggle (object sender, CancelEventArgs<CheckState> e)
         {
             if (e.NewValue == CheckState.Checked)
             {
-                view.ViewportSettings |= ViewportSettings.ClipContentOnly;
+                view.ViewportSettings |= Terminal.Gui.ViewportSettings.ClipContentOnly;
             }
             else
             {
-                view.ViewportSettings &= ~ViewportSettings.ClipContentOnly;
+                view.ViewportSettings &= ~Terminal.Gui.ViewportSettings.ClipContentOnly;
             }
         }
 
         var cbVerticalScrollBar = new CheckBox
         {
-            Title = "Vertical ScrollBar",
+            Title = "_VerticalScrollBar.Visible",
             X = 0,
             Y = Pos.Bottom (labelContentSize),
             CanFocus = false
         };
         cbVerticalScrollBar.CheckedState = view.VerticalScrollBar.Visible ? CheckState.Checked : CheckState.UnChecked;
-        cbVerticalScrollBar.CheckedStateChanging += VerticalScrollBar_Toggle;
+        cbVerticalScrollBar.CheckedStateChanging += VerticalScrollBarToggle;
 
-        void VerticalScrollBar_Toggle (object sender, CancelEventArgs<CheckState> e)
+        void VerticalScrollBarToggle (object sender, CancelEventArgs<CheckState> e)
         {
-            //view.VerticalScrollBar.ShowScrollIndicator = e.NewValue == CheckState.Checked;
+            view.VerticalScrollBar.Visible = e.NewValue == CheckState.Checked;
         }
 
         var cbHorizontalScrollBar = new CheckBox
         {
-            Title = "Horizontal ScrollBar",
+            Title = "_HorizontalScrollBar.Visible",
             X = Pos.Right (cbVerticalScrollBar) + 1,
             Y = Pos.Bottom (labelContentSize),
             CanFocus = false,
-            //CheckedState = view.HorizontalScrollBar.ShowScrollIndicator ? CheckState.Checked : CheckState.UnChecked
         };
-        //view.HorizontalScrollBar.ShowScrollIndicator = false;
-        cbHorizontalScrollBar.CheckedStateChanging += HorizontalScrollBar_Toggle;
+        cbHorizontalScrollBar.CheckedState = view.HorizontalScrollBar.Visible ? CheckState.Checked : CheckState.UnChecked;
+        cbHorizontalScrollBar.CheckedStateChanging += HorizontalScrollBarToggle;
 
-        void HorizontalScrollBar_Toggle (object sender, CancelEventArgs<CheckState> e)
+        void HorizontalScrollBarToggle (object sender, CancelEventArgs<CheckState> e)
         {
-            //view.HorizontalScrollBar.ShowScrollIndicator = e.NewValue == CheckState.Checked;
+            view.HorizontalScrollBar.Visible = e.NewValue == CheckState.Checked;
         }
 
-        var cbAutoHideVerticalScrollBar = new CheckBox
+        view.VerticalScrollBar.AutoShow = true;
+        var cbAutoShowVerticalScrollBar = new CheckBox
         {
-            Title = "Auto-hide Vertical ScrollBar",
+            Title = "VerticalScrollBar._AutoShow",
             X = Pos.Right (cbHorizontalScrollBar) + 1,
             Y = Pos.Bottom (labelContentSize),
             CanFocus = false,
-            CheckedState = view.HorizontalScrollBar.AutoHide ? CheckState.Checked : CheckState.UnChecked
+            CheckedState = view.VerticalScrollBar.AutoShow ? CheckState.Checked : CheckState.UnChecked
         };
-        view.VerticalScrollBar.AutoHide = true;
-        cbAutoHideVerticalScrollBar.CheckedStateChanging += AutoHideVerticalScrollBar_Toggle;
+        cbAutoShowVerticalScrollBar.CheckedStateChanging += AutoShowVerticalScrollBarToggle;
 
-        void AutoHideVerticalScrollBar_Toggle (object sender, CancelEventArgs<CheckState> e)
+        void AutoShowVerticalScrollBarToggle (object sender, CancelEventArgs<CheckState> e)
         {
-            view.VerticalScrollBar.AutoHide = e.NewValue == CheckState.Checked;
+            view.VerticalScrollBar.AutoShow = e.NewValue == CheckState.Checked;
         }
 
-        var cbAutoHideHorizontalScrollBar = new CheckBox
+        view.HorizontalScrollBar.AutoShow = true;
+        var cbAutoShowHorizontalScrollBar = new CheckBox
         {
-            Title = "Auto-hide Horizontal ScrollBar",
-            X = Pos.Right (cbAutoHideVerticalScrollBar) + 1,
+            Title = "HorizontalScrollBar.A_utoShow ",
+            X = Pos.Right (cbAutoShowVerticalScrollBar) + 1,
             Y = Pos.Bottom (labelContentSize),
             CanFocus = false,
-            CheckedState = view.HorizontalScrollBar.AutoHide ? CheckState.Checked : CheckState.UnChecked
+            CheckedState = view.HorizontalScrollBar.AutoShow ? CheckState.Checked : CheckState.UnChecked
         };
-        view.HorizontalScrollBar.AutoHide = true;
-        cbAutoHideHorizontalScrollBar.CheckedStateChanging += AutoHideHorizontalScrollBar_Toggle;
+        cbAutoShowHorizontalScrollBar.CheckedStateChanging += AutoShowHorizontalScrollBarToggle;
 
-        void AutoHideHorizontalScrollBar_Toggle (object sender, CancelEventArgs<CheckState> e)
+        void AutoShowHorizontalScrollBarToggle (object sender, CancelEventArgs<CheckState> e)
         {
-            view.HorizontalScrollBar.AutoHide = e.NewValue == CheckState.Checked;
+            view.HorizontalScrollBar.AutoShow = e.NewValue == CheckState.Checked;
         }
 
-        cbAllowNegativeX.CheckedStateChanging += AllowNegativeX_Toggle;
-        cbAllowNegativeY.CheckedStateChanging += AllowNegativeY_Toggle;
-
-        cbAllowXGreaterThanContentWidth.CheckedStateChanging += AllowXGreaterThanContentWidth_Toggle;
-        cbAllowYGreaterThanContentHeight.CheckedStateChanging += AllowYGreaterThanContentHeight_Toggle;
-
-        void SetHorizontalScrollBar (CheckState newValue, CheckState value)
-        {
-            if (newValue == CheckState.Checked)
-            {
-                cbAutoHideHorizontalScrollBar.CheckedState = CheckState.UnChecked;
-                //view.HorizontalScrollBar.AutoHide = view.HorizontalScrollBar.ShowScrollIndicator = false;
-                cbHorizontalScrollBar.CheckedState = CheckState.UnChecked;
-            }
-            else
-            {
-                cbAutoHideHorizontalScrollBar.CheckedState = CheckState.Checked;
-
-                //view.HorizontalScrollBar.AutoHide = view.HorizontalScrollBar.ShowScrollIndicator = newValue == CheckState.UnChecked
-                                                    //&& value == CheckState.UnChecked;
-                cbHorizontalScrollBar.CheckedState = CheckState.Checked;
-            }
-        }
+        cbAllowNegativeX.CheckedStateChanging += AllowNegativeXToggle;
+        cbAllowNegativeY.CheckedStateChanging += AllowNegativeYToggle;
 
-        void SetVerticalScrollBar (CheckState newValue, CheckState value)
-        {
-            if (newValue == CheckState.Checked)
-            {
-                cbAutoHideVerticalScrollBar.CheckedState = CheckState.UnChecked;
-                //view.VerticalScrollBar.AutoHide = view.VerticalScrollBar.ShowScrollIndicator = false;
-                cbVerticalScrollBar.CheckedState = CheckState.UnChecked;
-            }
-            else
-            {
-                cbAutoHideVerticalScrollBar.CheckedState = CheckState.Checked;
+        cbAllowXGreaterThanContentWidth.CheckedStateChanging += AllowXGreaterThanContentWidthToggle;
+        cbAllowYGreaterThanContentHeight.CheckedStateChanging += AllowYGreaterThanContentHeightToggle;
 
-                //view.VerticalScrollBar.AutoHide = view.VerticalScrollBar.ShowScrollIndicator = newValue == CheckState.UnChecked
-                //                                  && value == CheckState.UnChecked;
-                cbVerticalScrollBar.CheckedState = CheckState.Checked;
-            }
-        }
 
-        view.Padding.Add (labelContentSize, contentSizeWidth, labelComma, contentSizeHeight, cbClearContentOnly, cbClipContentOnly, cbVerticalScrollBar, cbHorizontalScrollBar, cbAutoHideVerticalScrollBar, cbAutoHideHorizontalScrollBar);
+        view.Padding.Add (labelContentSize, contentSizeWidth, labelComma, contentSizeHeight, cbClearContentOnly, cbClipContentOnly, cbVerticalScrollBar, cbHorizontalScrollBar, cbAutoShowVerticalScrollBar, cbAutoShowHorizontalScrollBar);
 
         // Add demo views to show that things work correctly
-        var textField = new TextField { X = 20, Y = 7, Width = 15, Text = "Test TextField" };
+        var textField = new TextField { X = 20, Y = 7, Width = 15, Text = "Test Te_xtField" };
 
-        var colorPicker = new ColorPicker16 { Title = "BG", BoxHeight = 1, BoxWidth = 1, X = Pos.AnchorEnd (), Y = 10 };
+        var colorPicker = new ColorPicker16 { Title = "_BG", BoxHeight = 1, BoxWidth = 1, X = Pos.AnchorEnd (), Y = 10 };
         colorPicker.BorderStyle = LineStyle.RoundedDotted;
 
         colorPicker.ColorChanged += (s, e) =>
@@ -461,13 +415,13 @@ public class ContentScrolling : Scenario
         {
             X = Pos.Center (),
             Y = 10,
-            Title = "TextView",
+            Title = "TextVie_w",
             Text = "I have a 3 row top border.\nMy border inherits from the SuperView.\nI have 3 lines of text with room for 2.",
             AllowsTab = false,
             Width = 30,
             Height = 6 // TODO: Use Dim.Auto
         };
-        textView.Border.Thickness = new (1, 3, 1, 1);
+        textView.Border!.Thickness = new (1, 3, 1, 1);
 
         var charMap = new CharMap
         {
@@ -486,10 +440,10 @@ public class ContentScrolling : Scenario
         };
         buttonAnchored.Accepting += (sender, args) => MessageBox.Query ("Hi", $"You pressed {((Button)sender)?.Text}", "_Ok");
 
-        view.Margin.Data = "Margin";
+        view.Margin!.Data = "Margin";
         view.Margin.Thickness = new (0);
 
-        view.Border.Data = "Border";
+        view.Border!.Data = "Border";
         view.Border.Thickness = new (3);
 
         view.Padding.Data = "Padding";
@@ -523,8 +477,6 @@ public class ContentScrolling : Scenario
 
         editor.Initialized += (s, e) => { editor.ViewToEdit = view; };
 
-        app.Closed += (s, e) => View.Diagnostics = _diagnosticFlags;
-
         editor.AutoSelectViewToEdit = true;
         editor.AutoSelectSuperView = view;
         editor.AutoSelectAdornments = false;

+ 1 - 1
UICatalog/UICatalog.cs

@@ -800,7 +800,7 @@ public class UICatalogApp
             CategoryList.SelectedItemChanged += CategoryView_SelectedChanged;
 
             // This enables the scrollbar by causing lazy instantiation to happen
-            _ = CategoryList.VerticalScrollBar;
+            CategoryList.VerticalScrollBar.AutoShow = true;
 
             // Create the scenario list. The contents of the scenario list changes whenever the
             // Category list selection changes (to show just the scenarios that belong to the selected

+ 13 - 13
UnitTests/Views/ScrollBarTests.cs

@@ -15,7 +15,7 @@ public class ScrollBarTests (ITestOutputHelper output)
         Assert.Equal (0, scrollBar.VisibleContentSize);
         Assert.Equal (0, scrollBar.GetSliderPosition ());
         Assert.Equal (0, scrollBar.Position);
-        Assert.False (scrollBar.AutoHide);
+        Assert.False (scrollBar.AutoShow);
     }
 
     #region AutoHide
@@ -34,11 +34,11 @@ public class ScrollBarTests (ITestOutputHelper output)
         {
         };
         super.Add (scrollBar);
-        Assert.False (scrollBar.AutoHide);
+        Assert.False (scrollBar.AutoShow);
         Assert.True (scrollBar.Visible);
 
-        scrollBar.AutoHide = true;
-        Assert.True (scrollBar.AutoHide);
+        scrollBar.AutoShow = true;
+        Assert.True (scrollBar.AutoShow);
         Assert.True (scrollBar.Visible);
 
         RunState rs = Application.Begin (super);
@@ -69,10 +69,10 @@ public class ScrollBarTests (ITestOutputHelper output)
         var scrollBar = new ScrollBar
         {
             ScrollableContentSize = 20,
-            AutoHide = false
+            AutoShow = false
         };
         super.Add (scrollBar);
-        Assert.False (scrollBar.AutoHide);
+        Assert.False (scrollBar.AutoShow);
         Assert.True (scrollBar.Visible);
 
         RunState rs = Application.Begin (super);
@@ -100,10 +100,10 @@ public class ScrollBarTests (ITestOutputHelper output)
             ScrollableContentSize = 20,
         };
         super.Add (scrollBar);
-        Assert.False (scrollBar.AutoHide);
+        Assert.False (scrollBar.AutoShow);
         Assert.True (scrollBar.Visible);
 
-        scrollBar.AutoHide = true;
+        scrollBar.AutoShow = true;
 
         RunState rs = Application.Begin (super);
 
@@ -119,7 +119,7 @@ public class ScrollBarTests (ITestOutputHelper output)
         Application.RunIteration (ref rs);
         Assert.True (scrollBar.Visible);
 
-        scrollBar.AutoHide = false;
+        scrollBar.AutoShow = false;
         Application.RunIteration (ref rs);
         Assert.True (scrollBar.Visible);
 
@@ -147,10 +147,10 @@ public class ScrollBarTests (ITestOutputHelper output)
             VisibleContentSize = 20
         };
         super.Add (scrollBar);
-        Assert.False (scrollBar.AutoHide);
+        Assert.False (scrollBar.AutoShow);
         Assert.True (scrollBar.Visible);
 
-        scrollBar.AutoHide = true;
+        scrollBar.AutoShow = true;
 
         RunState rs = Application.Begin (super);
 
@@ -174,7 +174,7 @@ public class ScrollBarTests (ITestOutputHelper output)
         Application.RunIteration (ref rs);
         Assert.False (scrollBar.Visible);
 
-        scrollBar.AutoHide = false;
+        scrollBar.AutoShow = false;
         Application.RunIteration (ref rs);
         Assert.True (scrollBar.Visible);
 
@@ -781,7 +781,7 @@ public class ScrollBarTests (ITestOutputHelper output)
 
         var scrollBar = new ScrollBar
         {
-            AutoHide = false,
+            AutoShow = false,
             Orientation = orientation,
         };
 

+ 6 - 1
docfx/docs/View.md

@@ -14,7 +14,7 @@
   
   * *Parent View* - A view that holds a reference to another view in a parent/child relationship, but is NOT a SuperView of the child. Terminal.Gui uses the terms "Child" and "Parent" sparingly. Generally Subview/SuperView is preferred.
   
-### Layout
+### Layout and Arrangement
 
 See the [Layout Deep Dive](layout.md) and the [Arrangement Deep Dive](arrangement.md).
 
@@ -26,6 +26,11 @@ See the [Drawing Deep Dive](drawing.md).
 
 See the [Navigation Deep Dive](navigation.md).
 
+### Scrolling
+
+See the [Scrolling Deep Dive](scrolling.md).
+
+
 ### Application Concepts 
 
   * *TopLevel* - The v1 term used to describe a view that can have a MenuBar and/or StatusBar. In v2, we will delete the `TopLevel` class and ensure ANY View can have a menu bar and/or status bar (via `Adornments`).

+ 3 - 2
docfx/docs/layout.md

@@ -2,7 +2,7 @@
 
 Terminal.Gui provides a rich system for how [View](View.md) objects are laid out relative to each other. The layout system also defines how coordinates are specified.
 
-See [View Deep Dive](View.md) and [Arrangement Deep Dive](arrangement.md) for more.
+See [View Deep Dive](View.md), [Arrangement Deep Dive](arrangement.md), [Scrolling Deep Dive](scrolling.md), and [Drawing Deep Dive](drawing.md) for more.
 
 ## Lexicon & Taxonomy
 
@@ -80,11 +80,12 @@ The Viewport (@Terminal.Gui.View.Viewport) is a rectangle describing the portion
 
 To enable scrolling call `View.SetContentSize()` and then set `Viewport.Location` to positive values. Making `Viewport.Location` positive moves the Viewport down and to the right in the content. 
 
+See the [Scrolling Deep Dive](scrolling.md) for details on how to enable scrolling.
+
 The `View.ViewportSettings` property controls how the Viewport is constrained. By default, the `ViewportSettings` is set to `ViewportSettings.None`. To enable the viewport to be moved up-and-to-the-left of the content, use `ViewportSettings.AllowNegativeX` and or `ViewportSettings.AllowNegativeY`. 
 
 The default `ViewportSettings` also constrains the Viewport to the size of the content, ensuring the right-most column or bottom-most row of the content will always be visible (in v1 the equivalent concept was `ScrollBarView.AlwaysKeepContentInViewport`). To allow the Viewport to be smaller than the content, set `ViewportSettings.AllowXGreaterThanContentWidth` and/or `ViewportSettings.AllowXGreaterThanContentHeight`.
 
-
 * *@Terminal.Gui.View.GetContentSize()* - The content area is the area where the view's content is drawn. Content can be any combination of the @Terminal.Gui.View.Text property, `Subviews`, and other content drawn by the View. The @Terminal.Gui.View.GetContentSize method gets the size of the content area of the view. *Content Area* refers to the rectangle with a location of `0,0` with the size returned by @Terminal.Gui.View.GetContentSize. The [Layout Deep Dive](layout.md) has more details on the Content Area.
 
 * *@Terminal.Gui.View.Viewport* A rectangle describing the portion of the *Content Area* that is currently visible to the user. It is a "portal" into the content. The `Viewport.Location` is relative to the top-left corner of the inner rectangle of `View.Padding`. If `Viewport.Size` is the same as `View.GetContentSize()`, `Viewport.Location` will be `0,0`. 

+ 6 - 8
docfx/docs/scrolling.md

@@ -7,10 +7,9 @@ Terminal.Gui provides a rich system for how [View](View.md) users can scroll con
 See [View Deep Dive](View.md) for broader definitions.
 
 * *Scroll* (Verb) - The act of causing content to move either horizontally or vertically within the [View.Viewport](~/api/Terminal.Gui.View.Viewport.yml). Also referred to as "Content Scrolling".
-* *[Scroll](~/api/Terminal.Gui.Scroll.yml)* (Noun) - Indicates the size of scrollable content and provides a visible element, referred to as the "ScrollSlider" that that is sized to show the proportion of the scrollable content to the size of the [View.Viewport](~/api/Terminal.Gui.View.Viewport.yml) and can be dragged with the mouse. A Scroll can be oriented either vertically or horizontally and is used within a [ScrollBar](~/api/Terminal.Gui.ScrollBar.yml).
-* *ScrollSlider* - The visual indicator that shows the proportion of the scrollable content to the size of the [View.Viewport](~/api/Terminal.Gui.View.Viewport.yml) and allows the user to use the mouse to scroll. The Scroll Slider is not exposed publicly. 
-* *[ScrollBar](~/api/Terminal.Gui.ScrollBar.yml)* - Provides a visual indicator that content can be scrolled. ScrollBars consist of two buttons, one each for scrolling forward or backwards, a Scroll that can be clicked to scroll large amounts, and a ScrollSlider that can be dragged to scroll continuously. ScrollBars can be oriented either horizontally or vertically and support the user dragging and clicking with the mouse to scroll.
-
+* *ScrollSlider* - A visual indicator that shows the proportion of the scrollable content to the size of the [View.Viewport](~/api/Terminal.Gui.View.Viewport.yml) and allows the user to use the mouse to scroll. 
+* *[ScrollBar](~/api/Terminal.Gui.ScrollBar.yml)* -  Indicates the size of scrollable content and controls the position of the visible content, either vertically or horizontally. At each end, a @Terminal.Gui.Button is provided, one to scroll up or left and one to scroll down or right. Between the
+ buttons is a @Terminal.Gui.ScrollSlider that can be dragged to control the position of the visible content. The ScrollSlier is sized to show the proportion of the scrollable content to the size of the @Terminal.Gui.View.Viewport.
 
 ## Overview
 
@@ -25,17 +24,16 @@ Scrolling with the mouse and keyboard are enabled by:
 1) Making the [View.Viewport](~/api/Terminal.Gui.View.Viewport.yml) size smaller than the size returned by [View.GetContentSize()](~/api/Terminal.Gui.View.GetContentSize.yml). 
 2) Creating key bindings for the appropriate directional keys (e.g. [Key.CursorDown](~/api/Terminal.Gui.Key)), and calling [View.ScrollHorizontal()](~/api/Terminal.Gui.View.ScrollHorizontal.yml)/[ScrollVertical()](~/api/Terminal.Gui.View.ScrollVertical.yml) as needed.
 3) Subscribing to [View.MouseEvent](~/api/Terminal.Gui.View.MouseEvent.yml) and calling calling [View.ScrollHorizontal()](~/api/Terminal.Gui.View.ScrollHorizontal.yml)/[ScrollVertical()](~/api/Terminal.Gui.View.ScrollVertical.yml) as needed.
-4) Enabling the [ScrollBar](~/api/Terminal.Gui.ScrollBar.yml)s built into View ([View.HorizontalScrollBar/VerticalScrollBar](~/api/Terminal.Gui.View.HorizontalScrollBar.yml)) by setting the flag [ViewportSettings.EnableScrollBars](~/api/Terminal.Gui.ViewportSettings.EnableScrollBars.yml) on [View.ViewportSettings](~/api/Terminal.Gui.View.ViewportSettings.yml). 
+4) Enabling the [ScrollBar](~/api/Terminal.Gui.ScrollBar.yml)s built into View ([View.HorizontalScrollBar/VerticalScrollBar](~/api/Terminal.Gui.View.HorizontalScrollBar.yml)) by either enabling automatic show/hide behavior (@Terminal.Gui.ScrollBar.AutoShow) or explicitly making them visible (@Terminal.Gui.View.Visible).
 
 ## Examples
 
 These Scenarios illustrate Terminal.Gui scrolling:
 
+* *Scrolling* - Demonstrates the @Terminal.Gui.ScrollBar objects built into-View.
+* *ScrollBar Demo* - Demonstrates using @Terminal.Gui.ScrollBar view in a standalone manner.
 * *Content Scrolling* - Demonstrates the various [Viewport Settings](~/api/Terminal.Gui.ViewportSettings.yml) (see below) in an interactive manner. Used by the development team to visually verify that convoluted View layout and arrangement scenarios scroll properly.
 * *Character Map* - Demonstrates a sophisticated scrolling use-case. The entire set of Unicode code-points can be scrolled and searched. From a scrolling perspective, this Scenario illustrates how to manually configure `Viewport`, `SetContentArea()`, and `ViewportSettings` to enable horizontal and vertical headers (as might appear in a spreadsheet), full keyboard and mouse support, and more. 
-* *Scroll Demo* - Designed to demonstrate using the `Scroll` view in a standalone manner.
-* *ScrollBar Demo* - Designed to demonstrate using the `ScrollBar` view in a standalone manner.
-* *Scrolling* - A legacy Scenario from v1 that is used to visually test that scrolling is working properly.
 * *ListView* and *TableView* - The source code to these built-in Views are good references for how to support scrolling and ScrollBars in a re-usable View sub-class. 
 
 ## [Viewport Settings](~/api/Terminal.Gui.ViewportSettings.yml)