locked
Button with Image and Text? RRS feed

  • Question

  • How can I put both text and image inside a a button?
    Thursday, January 28, 2010 4:58 PM

Answers

  • You can use a Panel to wrap TextBlock and Image elements and put inside of button since button is a ContentControl that takes one child.
            <Button>
                <StackPanel>
                    <TextBlock Text="Image Button"/>
                    <Image Source="Phone.jpg" Width="100"/>
                </StackPanel>
            </Button>


    William
    • Marked as answer by QuddusAli Thursday, January 28, 2010 6:18 PM
    Thursday, January 28, 2010 5:05 PM