Reputation: 3938
I am skinning my app and want have a generic button graphic for all buttons, and then each button have unique content. I've created a DrawingBrush for the generic button graphic and applied it the button's background using a style defined in my resource dictionary. This all works great. However, when I then try to add something other than text to the Content of the button, no content shows up. I just get the background graphic. What do I need to do to have graphical content for both the button's background and content?
Upvotes: 1
Views: 1391
Reputation: 13907
If templating, you need to have a ContentPresenter
for displaying the content of the button.
See here for an example on templating a button. In Stage 2, he adds a ContentPresenter to the template. (He actually adds two for a double-effect, but you could just use the simpler one.)
Upvotes: 2