如何在WPF窗口的页脚中排列图像? [英] How to arrange images in footer of a wpf window?
本文介绍了如何在WPF窗口的页脚中排列图像?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想在wpf窗口的底部安排一些图像,只剩下页脚行.从左到右.我为此使用了堆栈面板.但是我只在右侧获得图像.我该怎么解决...
请帮帮我.
我的代码段是:
I want to arrange some images in my wpf window at the bottom nothing but footer row. from left to right. I used stack panel for this. But I am getting the images only right side. How can I solve this...
please help me.
my code snippet is:
<stackpanel orientation="Horizontal" horizontalalignment="Left" verticalalignment="Bottom">
<Button>
<Image Source="/Images/save_bill1-iPhone.png" Width="200" DockPanel.Dock="Bottom" HorizontalAlignment="Left" VerticalAlignment="Bottom" ></Image>
</Button>
<Button >
<Image Source="/Images/save_bill1-iPhone.png" Width="200" DockPanel.Dock="Bottom" ></Image>
</Button>
<Button >
<Image Source="/Images/save_bill1-iPhone.png" Width="200" DockPanel.Dock="Bottom" ></Image>
</Button>
<Button >
<Image Source="/Images/save_bill1-iPhone.png" Width="200" DockPanel.Dock="Bottom" ></Image>
</Button>
</stackpanel>
谢谢
推荐答案
如果我正确理解了您的问题,
StackPanel
将其子容器一个接一个地对齐(即逐行对齐).如果要将它们对齐在一行中,则应使用Grid
.
网格同时支持Row
&Column
.将图像放在列中.
探索它,您当然可以完成.
-KR
If I understood your issue correctly,
StackPanel
will align its child container one after another (i.e row wise). If you want to align them in one line, you should useGrid
.
Grid supports bothRow
&Column
. Place the images in columns.
Explore about it and you can certainly get this done.
-KR
这篇关于如何在WPF窗口的页脚中排列图像?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文