c# - Reference point for lines in list view -


i trying show lines on canvas,those lines vary in y axis position ,so created itemscontrol , binded dictionary has y value , text display on line .

my problem line getting displayed (x1,y1)(x2,y2) point reference individual item's origin want each line take y axis distance canvas origin point.

<canvas margin="0,8,0,8" height="374" width="150"  > <itemscontrol itemssource="{binding path=ypointsdictionary margin="0">  <itemscontrol.itemtemplate>   <datatemplate>              <stackpanel orientation="horizontal">           <line  x1="0" y1="{binding value}" x2="150" y2="{binding value}"                strokethickness="2" stroke="yellow" strokedasharray="2,2"  />          <label content="{binding key}" foreground="yellow" />                        </stackpanel>     </datatemplate>     </itemscontrol.itemtemplate>    </itemscontrol>   </canvas> 

making stackpanel orientation vertical gives result. want?

eg:

  <stackpanel orientation="vertical"  >         <line x1="0" y1="50" x2="150" y2="50" stroke="red" strokethickness="5"></line>         <line x1="0" y1="100" x2="150" y2="100" stroke="blue" strokethickness="5"></line>         <line x1="0" y1="150" x2="150" y2="150" stroke="green" strokethickness="5"></line>     </stackpanel> 

Comments

Popular posts from this blog

PHPMotion implementation - URL based videos (Hosted on separate location) -

c# - Unity IoC Lifetime per HttpRequest for UserStore -

I am trying to solve the error message 'incompatible ranks 0 and 1 in assignment' in a fortran 95 program. -