1
public void CreateALine(double x1, double y1)
{
// Create a Line
Line redLine = new Line();
redLine.X1 = x + 20;
redLine.Y1 = y + 20;
redLine.X2 = x1 + 20;
redLine.Y2 = y1 + 20;
SolidColorBrush gBrush = new SolidColorBrush();
gBrush.Color = Colors.Green;
redLine.StrokeThickness = 2;
redLine.Stroke = gBrush;
// Add line to the Canvas
canvas2.Children.Add(redLine);
}
這是我的代碼,現在我想刪除這一行,誰能告訴我該怎麼做? 謝謝。uwp如何刪除一行