I've used System.Windows.Shapes
before to add Shapes
to Canvas
-controls.
They can be used like objects and the visuals change as I edit the fields. I can also add event handlers for clicks etc.
I'd need this kind of functionality by using Win2D
. Is there any easy way?
I'm trying to create a simple app like this:
- User can draws shapes to canvas
- Shapes can be selected and highlighted by clicking
- Selected shapes's can be manipulated (color, opacity, width, height, position etc)
- Shapes can be layered over each other (Z-index)
I guess one way would be to create custom Shape
classes with Draw
-methods. I'd then only manipulate the object - and the changes would reflect to visuals thru the Draw
-method. On each canvas invalidation, the objects would be drawn again.
Any ideas?