问题
It's incredible that such sample code doesn't even work.
I have put this inside grid but I can't see any line (code taken from MSDN in fact):
<Canvas Height="103" HorizontalAlignment="Left" Margin="30,166,0,0" Name="canvas1" VerticalAlignment="Top" Width="180">
<Line
X1="0" Y1="10"
X2="5" Y2="10"
Stroke="Black"
StrokeThickness="4" />
</Canvas>
This is incredible that such simple thing like that would be so buggy so did I miss something see picture below ? (Everything else in silverlight works fine for me):

Update: the bug is confirmed. This is quite incredible that MS hasn't fixed this !
回答1:
It does appear. Your line is a very small dot with 5pixel width. Try changing the coordinates to draw a longer line.
回答2:
Others have confirmed with latest version of Silverlight this doesn't work except OUTSIDE OF CANVAS ! So indeed this is a huge bug.
回答3:
I've faced exactly with that and here is my solution:
<Canvas Height="103" Width="180" HorizontalAlignment="Left" Margin="30,166,0,0" Name="canvas1" VerticalAlignment="Top" >
<Line Height="103" Width="180" X1="0" Y1="10" X2="5" Y2="10" Stroke="Black" StrokeThickness="4" />
</Canvas>
Thus, you must set to same size with Line and Canvas. Actually, Line placing to where you put but it isn't showing cause hasn't size.
来源:https://stackoverflow.com/questions/5800252/silverlight-is-completely-buggy-with-canvas