Exemplo n.º 1
0
		public MultiplicationArea ()
		{
			HeightRequest = 4;
			WidthRequest = 4;
			
			var canvas = new Canvas ();
			
			var ellipse = new Ellipse ()
			{
				WidthRequest = 4,
				HeightRequest = 4,
				StrokeThickness = 1,
				Fill = Brushes.Black
			};
						
			canvas.Children.Add (ellipse);			
			
			Content = canvas;
			Margin = new Thickness (2, 0, 2, 0);
		}
Exemplo n.º 2
0
		public AssignmentArea ()
		{
			var grid = new Grid ();

			var ellipse1 = new Ellipse ()
			{
				WidthRequest = 3,
				HeightRequest = 3,
				StrokeThickness = 1,
				Fill = Brushes.Black,
				Margin = new Thickness(1)
			};

			var ellipse2 = new Ellipse ()
			{
				WidthRequest = 3,
				HeightRequest = 3,
				StrokeThickness = 1,
				Fill = Brushes.Black,
				Margin = new Thickness(1)
			};

			var line1 = new Line ()
			{
				WidthRequest = 12,
				HeightRequest = 2,
				StrokeThickness = 2,
				Stroke = Colors.Black,
				SnapsToDevicePixels = true,
				Margin = new Thickness (0,2,0,0)
			};

			var line2 = new Line ()
			{
				WidthRequest = 12,
				HeightRequest = 2,
				StrokeThickness = 2,
				Stroke = Colors.Black,
				SnapsToDevicePixels = true,
				Margin = new Thickness (0,2,0,0)
			};
						
			grid.Children.Add (ellipse1);
			grid.Children.Add (ellipse2);
			grid.Children.Add (line1);
			grid.Children.Add (line2);

			grid.SetRow (0, ellipse1);
			grid.SetColumn (0, ellipse1);

			grid.SetRow (0, line1);
			grid.SetColumn (1, line1);


			grid.SetRow (1, ellipse1);
			grid.SetColumn (0, ellipse1);

			grid.SetRow (1, line2);
			grid.SetColumn (1, line2);
						
			Content = grid;
		}