在wpf中加入Roatation [英] BUttons Roatation in wpf
本文介绍了在wpf中加入Roatation的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在堆叠面板上有5个按钮。第一次我应该只显示3个按钮,经过一段时间后再说10秒我需要显示重新映射两个按钮并在10秒后再次显示3按钮等让我知道如何在wpf
谢谢,
Subbu。
Hi,
I am having 5 buttons in a stackpanel.First time i should show only 3 buttons and after some time let say 10 sec i need to show remaing two buttons and again after 10 sec 3 buttons etc. Let me know how to do this in wpf
Thanks,
Subbu.
推荐答案
您可以通过ItemsControl创建ItemsControl并添加/删除按钮,
设置如何使用ItemsPanel排列这些按钮,例如:
You can create an ItemsControl and add/remove button via the ItemsControl,
to set how to arrange those buttons use ItemsPanel, e.g:
<ItemsControl x:Name="ic" Height="30">
<ItemsControl.ItemTemplate>
<DataTemplate>
<Button Content="{Binding}" />
</DataTemplate>
</ItemsControl.ItemTemplate>
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<StackPanel Orientation="Horizontal" />
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
<sys:String>Merry</sys:String>
<sys:String>Christmas</sys:String>
</ItemsControl>
问候
Joseph Leung
Regards
Joseph Leung
这篇关于在wpf中加入Roatation的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文