I am relatively new to WPF, can someone point me to the best methodology please?
I will be creating a block diagram with lines linking the blocks. The boxes will all be in a row so I was thinking of a horizontally aligned stack panel with rectangles and lines.
The rectangles are to fill a tab page, and be clickable.
The problem is I don't know until run-time how many rectangles there will be.
What would be the right way to do this, should it be in code-behind where i find out the number of rectangles and add and position them and the lines in code or can i do something in XAML with a bit more flexibility?
The number of rectangles would be be between 2 and 10, so if it was 2 i wouldn't want them filling up the whole width of the tab. So ideally i would like the rectangle to have a min and max width and be centered so it still looks quite nice.
Many thanks in advance