Styling a WPF Button with Image+Text

后端 未结 4 4990
忘了有多久
忘了有多久 2021-02-20 19:04

In my C#/WPF/.NET 4.5 application I have buttons with images that I implemented in the following fashion:

4条回答
  •  一生所求
    2021-02-20 19:31

    The solution to your problem may be to move your Image and TextBlock styles to the ControlTemplate's Resource section. I'm not sure why, but I believe the styles aren't in scope if they are part of the content presenter's resources.

提交回复
热议问题