WrapPanel in Silverlight 4 toolkit

家住魔仙堡 提交于 2019-12-10 15:47:22

问题


This seems like such a silly question, but I can't for the life of me figure out how to use the WrapPanel in the most recent (April 2010) Silverlight toolkit.

Apparently they thought it was a good idea to change the namespaces/assemblies around, and not put anything on their codeplex site about this. And their samples for these controls do not show the entire code (like where they register these namespaces.)

Any help would be appreciated.


回答1:


What have you tried? From what I can tell from the source, it should be something like:

<UserControl ... xmlns:tk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit">
    <tk:WrapPanel/>
</UserControl>

Note that it shouldn't really matter if they've changed assemblies around, or even namespaces, because they've mapped relevant CLR namespaces to http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit.




回答2:


Sigh - here's what you need:

xmlns:wp="http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit"

Hope someone else stumbles on here and saves some time.




回答3:


Try putting ScrollViewer.HorizontalScrollBarVisibility="Disabled" on your list box

Found that here

http://blogs.msdn.com/b/synergist/archive/2009/01/19/using-silverlight-toolkit-wrappanel-in-your-listbox.aspx



来源:https://stackoverflow.com/questions/3988744/wrappanel-in-silverlight-4-toolkit

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!