tags:

views:

12

answers:

1

I have the need to draw shapes in XAML that are always relative to the container window/canvas size. For example, I need a window to show a 3x3 grid on it, where the grid always splits the window into 3 equal parts. Can I create lines that are bound to 1/3 the width of the grid?

thank you

A: 

You can set ColumnDefinitions in XAML, for the grid that you want ... all you need to do is set the Column's width to a percentage and you'll get the desired affect.

You can then set border's to create the lines you're looking for.

Does that solve your problem, or am I missing something

Chris Nicol
this should work, but I was using a canvas instead of a grid, because I'll be rendering shapes are arbitrary points in the next phase of the project.
taglius
you can still use canvas ... you'll just need to position the elements through more logic and probably in code.
Chris Nicol