public GWire() { model = new GWireModel(); this.DataContext = model; WirePath.DataContext = this; this.InitializeComponent(); }
/// <summary> /// Create a GWire from the xy coordinates of two GPrimitives. /// Not really type safe, I guess. Perhaps in the future. /// </summary> /// <param name="x1"></param> /// <param name="y1"></param> /// <param name="x2"></param> /// <param name="y2"></param> public GWire(double x1, double y1, double x2, double y2) { model = new GWireModel(); this.DataContext = model; this.InitializeComponent(); WirePath.DataContext = this; PathData = CalculatePathSegmentsFromParentCoordinates(x1, y1, x2, y2); }