c# - Line between 2 controls doesn't redraw -


i have b buttons created dynamically code , want draw line between first node , last in same stackpanel. problem whenever call function doesn't make line first b button instead move line right.

my code line draw function:

public void createaline() {     redline = new line();      redline.x1 = nodul_nou[0].margin.left ;     redline.y1 = nodul_nou[b].margin.top - 40;      redline.x2 = nodul_nou[b].margin.left ;     redline.y2 = nodul_nou[b].margin.top - 40;      solidcolorbrush redbrush = new solidcolorbrush();      redbrush.color = colors.black;     redline.strokethickness = 4;     redline.stroke = redbrush;      workplace.children.add(redline); } 

note: nodul_nou[b] button speak about, not draw line between first button, nodul_nou[0], , b button, nodul_nou[b].


Comments

Popular posts from this blog

html5 - What is breaking my page when printing? -

c# - must be a non-abstract type with a public parameterless constructor in redis -

ajax - PHP/JSON Login script (Twitter style) not setting sessions -