Drawing a Line.. X1 Y1 start points do not work


hi

i trying draw lines on canvas. seems line control has strange behavior. seems x1 , y1 have no affect or strange effect on lines. strange because canvas.top , canvas.left seem act more x1, y1. cannot find consistencies lines in random places.


strange behaviour?
 

 for example follow xaml

<usercontrol x:class="silverlightapplication1.page"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:ctrls="clr-namespace:silverlightapplication1.controls;assembly=silverlightapplication1"
width="800" height="800">
<canvas name="uimain" canvas.left="0" canvas.top="0" width="800" height="800" background="lightskyblue" >
<line name="uiline" x1="200" y1="200" x2="400" y2="400" fill="#ff0f34e4" stretch="fill" stroke="#ff0f34e4" />
<line name="uiline2" x1="200" y1="200" x2="400" y2="100" fill="#ffffffff" stretch="fill" stroke="#ff000000" />
<textblock name="uioutput" canvas.top="10" canvas.left="30"></textblock>
</canvas>
</usercontrol>
for example, expected and actual output.  
it frustrating line not acting line should.
 
michael 



 


  

remove stretch="fill" lines , work



Silverlight  >  Getting Started with Silverlight



Comments

Popular posts from this blog

Motherboard replacement

Cannot create Full Text Search catalog after upgrading to V12 - Database is not fully started up or it is not in an ONLINE state

Remote Desktop App - Error 0x207 or 0x607