C#/WPF - Picturebox like control?

后端 未结 2 2074
一生所求
一生所求 2021-01-16 17:47

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

相关标签:
2条回答
  • 2021-01-16 18:05

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

    0 讨论(0)
  • 2021-01-16 18:19

    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.

    0 讨论(0)
提交回复
热议问题