John
John

Reputation: 61

C#/WPF - Picturebox like control?

Does a picturebox like control exist in WPF? I want a control that I can easily change/retrieve the backcolor of.

Upvotes: 2

Views: 5281

Answers (2)

Nikita Shrivastava
Nikita Shrivastava

Reputation: 3018

You can use rectangle control & set the Fill property with the respective color. For click event, you can add MouseDownEvent handler to rectangle.

Upvotes: -2

Philippe Paré
Philippe Paré

Reputation: 4408

Image is the class you are looking for. The name may be confusing, but it is a control. Also, everything in WPF can be customized. The background color of every control can be changed.

Upvotes: 4

Related Questions