tags:

views:

19

answers:

1

Hi all,

Does anyone know how to draw a line between two items in a grid? I would normally use a canvas but it does not provide the layout I want.

The grid is the ItemsPanel of an ItemControl object.

Thanks,

Adam

A: 

You have to do following things, Suppose you have three columns in the grid and one item is in the first column and second item is in the third column and you have to draw line between them. and I am supposing that all the columns of the grid has same width.

  1. Write style for the button which only contain the line.
  2. now set the left margin and right margin of the line ( which will be the button and style of the button , you have created as I have mention above), to the half size of the columns width, and set the columnSpan of the line button to 3.

Hope that will help.

Asim Sajjad