Erik Z
Erik Z

Reputation: 4780

What kind of WPF control to use?

I want to create a 2D control that looks like a can. One color on the bottom and another color on the side. I will place many instances of this control on a canvas, and the canvas inside av viewbox.

alt text

I need support for tooltip, rightclick and drag&drop. It also has to support databinding and resizing.

What is the best way to create this control? Any advise is welcome. Thanks!

Upvotes: 1

Views: 62

Answers (1)

Dean Chalk
Dean Chalk

Reputation: 20481

My advice is make a VisualBrush which has the drawing of the can as its contents. Then each item would be a Rectangle (which will support the features you need), and the Rectangle's Fill property will be set to the VisualBrush

Upvotes: 3

Related Questions