Hi I want to have a rectangle like the below picture to fill the entire canvas with different sizes and at different position scatter through out the canvas. My solution environment is WPF C#
Could some one please guide me of how to do it? Till now what I have done is canvas_loaded
Rectangle rect = new Rectangle();
rect.Fill = new SolidColorBrush(Colors.Black);
rect.Width = 100;
rect.Height = 100;
rect.Stroke = new SolidColorBrush(Colors.Black);
But the problem here how will I position it to the different locaion of the canvas, the size and width I can provide at run time with different value but I need to position the rectangles (Square) at diffrent XY co-ordinates so that none of the rectangles or Squares overlapp each other.
Please help.