Windows Phone: How to draw a line on a Rectangle?
I draw a rectangle and I need to divide this rectangle into 2 parts. I am
trying to use line in order to divide it but I dont know why I can not see
the line.
Rectangle rect = new Rectangle();
rect.Fill= Colors.Blue;
rect.Width=100;
rect.Margin = new Thikness (0,40,0,0);
grid.Children.Add(rect);
Line line = new Line();
line.Stroke = Colors.Black;
line.StrokeThickness=1;
line.X1=2;
line.X2=7;
line.Y1=41;
line.Y2=41;
grid.Children.Add(line);
Do you have any idea that how can I add a line on the rectangle?
No comments:
Post a Comment