在WPF中:
<Button Width="24" Height="24" >
<Image Source="pack://application:,,,/res/x.png" VerticalAlignment="Center"/>
</Button>
我该如何在C#中模仿这个功能?我在Button
类中找不到任何添加子元素的方法。