I need to show in a button a text and an image (i mean one at the top and the other at the bottom of the button, so both can be well visible) so i put the image as background and the text as the content of the button, but it puts both at the same space so they look mixed, how can i separate the content and the background? Thanks for your help.
Asked
Active
Viewed 79 times
0
-
Grid in a control template? Or http://stackoverflow.com/questions/2726986/button-template-with-image-and-text-in-wpf – kenny Jul 07 '12 at 22:14
1 Answers
3
A Button
can hold any content. In this case, create a StackPanel
in the Button and add the content:
<Button>
<StackPanel>
<TextBlock />
<Image />
</StackPanel>
</Button>

Metro Smurf
- 37,266
- 20
- 108
- 140