瀏覽代碼

Completed settings UI in demo scenario

Tig 1 年之前
父節點
當前提交
f924ea3d79
共有 1 個文件被更改,包括 13 次插入0 次删除
  1. 13 0
      UICatalog/Scenarios/VirtualContentScrolling.cs

+ 13 - 0
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);