EditCategory
Drawing
EditQuestion
Since the Line shape requires explicit start and end point coordinates, how do I draw a line whose position and length are to be managed by the layout Panel which contains the line?
EditAnswer
Use 0 or 1 as X and Y coordinates for both points, and set the Stretch property to Fill.
For example, the following code draws a horizontal line whose length will be determined by the containing Panel's width:
<Line X1="0" Y1="0"
X2="1" Y2="0"
Stretch="Fill" />
EditSource Link
http://groups.google.com/group/microsoft.public.windows.developer.winfx.avalon/browse_frm/thread/1bbeb1d8e4c91789/d9200befabc273a7?q=line+stretch&rnum=1#d9200befabc273a7EditKeywords
line, shape, drawing, stretch, layout