|
-
Sep 16th, 2011, 03:27 PM
#1
Thread Starter
Addicted Member
[RESOLVED] Dynamic line in a canvas
How can I draw a line in a canvas that starts at a specific coordinate, but ends dynamically. The line basically needs to start at a point in the canvas and just be a horizontal line that stretches in length with the dynamic length of the grid cell the canvas is located in?
Here's some code:
Code:
<Canvas Grid.Row="1">
<Line
X1="10" Y1="8"
X2="220" Y2="8"
Stroke="#FFDED0D0"
StrokeThickness="2" />
</Canvas>
<Canvas Grid.Column="1" Grid.Row="1">
**the line with the dynamic length stretches along this canvas**
</Canvas>
<Canvas Grid.Column="2" Grid.Row="1">
<Line
X1="0" Y1="8"
X2="240" Y2="8"
Stroke="#FFDED0D0"
StrokeThickness="2" />
</Canvas>
Thanks for your help!
-
Sep 16th, 2011, 04:35 PM
#2
Thread Starter
Addicted Member
Re: Dynamic line in a canvas
Nevermind, I just did it with an image, setting stretch to Fill.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|