Add an image in a WPF button

前端 未结 7 945
执念已碎
执念已碎 2020-12-23 12:59

I tried this solution:

相关标签:
7条回答
  • 2020-12-23 14:05

    Use:

    <Button Height="100" Width="100">
      <StackPanel>
        <Image Source="img.jpg" />
        <TextBlock Text="Blabla" />
      </StackPanel>
    </Button>
    

    It should work. But remember that you must have an image added to the resource on your project!

    0 讨论(0)
提交回复
热议问题