0

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.

H.B.
  • 142,212
  • 27
  • 297
  • 366
Fernando Santiago
  • 1,960
  • 8
  • 43
  • 70
  • 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 Answers1

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
  • 35,510
  • 20
  • 101
  • 134