Browse Source

restored Generic.cs

Tig Kindel 2 years ago
parent
commit
7fc6a8536a
1 changed files with 4 additions and 25 deletions
  1. 4 25
      UICatalog/Scenarios/Generic.cs

+ 4 - 25
UICatalog/Scenarios/Generic.cs

@@ -27,34 +27,13 @@ namespace UICatalog.Scenarios {
 			// With a Scenario, after UI Catalog calls `Scenario.Setup` it calls
 			// `Scenario.Run` which calls `Application.Run`.
 			// Example:
-			//var button = new Button ("Press me!") {
-			//	AutoSize = false,
-			//	X = Pos.Center (),
-			//	Y = Pos.Center (),
-			//};
-			//button.Clicked += () => MessageBox.Query (20, 7, "Hi", "Neat?", "Yes", "No");
-			//Win.Add (button);
-
-			Win.Visible = false;
-
-			var label = new Label () {
+			var button = new Button ("Press me!") {
+				AutoSize = false,
 				X = Pos.Center (),
 				Y = Pos.Center (),
-				Border = new Border () {
-					BorderStyle = BorderStyle.Single,
-					Padding = new Thickness (2),
-					BorderThickness = new Thickness (2),
-					BorderBrush = Color.Red,
-					Background = Color.BrightGreen,
-					Effect3D = true,
-					Effect3DOffset = new Point (2, -3)
-				},
-				ColorScheme = Colors.TopLevel,
-				Text = "This is a test"
 			};
-			label.Border.Child = label;
-			Application.Top.Add (label);
-
+			button.Clicked += () => MessageBox.Query (20, 7, "Hi", "Neat?", "Yes", "No");
+			Win.Add (button);
 		}
 	}
 }