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.
  • 166,899
  • 29
  • 327
  • 400
Fernando Santiago
  • 2,128
  • 10
  • 44
  • 75
  • 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
  • 37,266
  • 20
  • 108
  • 140