Beispiel #1
0
		public void ExpandStarsInStackPanel ()
		{
			MyGrid grid = CreateGridWithChildren ();
			var parent = new StackPanel ();
			parent.Children.Add (grid);

			TestPanel.Width = 75;
			TestPanel.Height = 75;

			CreateAsyncTest (parent,
				() => {
					grid.CheckRowHeights ("#1", 15, 15, 15);
					grid.CheckColWidths ("#2", 12, 25, 38);
					
					grid.HorizontalAlignment = HorizontalAlignment.Left;
					grid.VerticalAlignment = VerticalAlignment.Center;
					parent.InvalidateSubtree ();
				}, () => {
					grid.CheckRowHeights ("#3", 15, 15, 15);
					grid.CheckColWidths ("#4", 12, 15, 15);

					grid.Width = 50;
					grid.Height = 50;
					parent.InvalidateSubtree ();
				}, () => {
					grid.CheckRowHeights ("#5", 8, 17, 25);
					grid.CheckColWidths ("#6", 8, 17, 25);

					grid.ClearValue (Grid.HorizontalAlignmentProperty);
					grid.ClearValue (Grid.VerticalAlignmentProperty);
					parent.InvalidateSubtree ();
				}, () => {
					grid.CheckRowHeights ("#7", 8, 17, 25);
					grid.CheckColWidths ("#8", 8, 17, 25);
				}
			);
		}