WPF:图像按钮小 [英] WPF: Image Button small
本文介绍了WPF:图像按钮小的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我已经通过XAML创建的图像按钮:
I've created an image button via xaml:
<Button x:Name="btnAdd5" Grid.Column="12" Grid.Row="6" Visibility="Visible" >
<Image Source="/MyApp;component/Images/Icons/add-icon.png" />
</Button>
在XAML设计,一切都很好,但调试模式中我只看到一个小圆点。
At the xaml designer, everything is fine, but during the Debug Mode I do only see a little dot.
我做了什么错了?
推荐答案
尝试把图像如下:
<Button>
<Button.Template>
<ControlTemplate>
<Image Source="/MyApp;component/Images/Icons/add-icon.png" x:Name="btnAdd4I" Visibility="Visible" Stretch="Fill" />
</ControlTemplate>
</Button.Template>
</Button>
这篇关于WPF:图像按钮小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文