From f924ea3d79bada93d755d7712a80f4ad3a008f5b Mon Sep 17 00:00:00 2001 From: Tig Date: Thu, 11 Apr 2024 06:22:07 -0600 Subject: [PATCH] Completed settings UI in demo scenario --- UICatalog/Scenarios/VirtualContentScrolling.cs | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/UICatalog/Scenarios/VirtualContentScrolling.cs b/UICatalog/Scenarios/VirtualContentScrolling.cs index 3131cd22b..6a8a5b426 100644 --- a/UICatalog/Scenarios/VirtualContentScrolling.cs +++ b/UICatalog/Scenarios/VirtualContentScrolling.cs @@ -166,6 +166,12 @@ public class VirtualScrolling : Scenario X = Pos.Right (labelContentSize) + 1, Y = Pos.Top (labelContentSize), }; + contentSizeWidth.ValueChanged += ContentSizeWidth_ValueChanged; + + void ContentSizeWidth_ValueChanged (object sender, PropertyChangedEventArgs e) + { + view.ContentSize = view.ContentSize with { Width = ((Buttons.NumericUpDown)sender).Value }; + } var labelComma = new Label () { @@ -181,6 +187,13 @@ public class VirtualScrolling : Scenario Y = Pos.Top (labelContentSize), CanFocus =false }; + contentSizeHeight.ValueChanged += ContentSizeHeight_ValueChanged; + + void ContentSizeHeight_ValueChanged (object sender, PropertyChangedEventArgs e) + { + view.ContentSize = view.ContentSize with { Height = ((Buttons.NumericUpDown)sender).Value }; + } + view.Padding.Add (labelContentSize, contentSizeWidth, labelComma, contentSizeHeight);