We would like to make a little drawing application and i don't know how to make a class derived from shape or uielement or something else that contains multiple objects like a line and text or multiple lines that are not connected. How would i do that?
For an ellipse i have this:
public class B_Null : Shape
{
EllipseGeometry eg;
public double Breedte { get; private set; }
public B_Null()
{
Stroke = Brushes.Red;
StrokeThickness = 1;
Fill = Brushes.Red;
eg = new EllipseGeometry(new Point(100, 100), 100, 100);
Breedte = 200;
}
protected override Geometry DefiningGeometry
{
get
{
return eg;
}
}
}
The above works but it cannot handle multiple uielements? (Or multiple lines that are not connected)
The goal is to have one class that contains multiple elements. At the end i want to use this code: Canvas.SetTop(MyUiElement,...);