问题
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