如何引用在Windows1.xaml中定义源码如下
<ListView x:Name="listView1" ItemTemplate="{StaticResource myLVItemTemplate}"
Template="{StaticResource myLVTemplate}" ItemContainerStyle="{StaticResource ItemContainerStyle}"
Margin="0,4,0,4" MouseDoubleClick="OnLocalFSOpen" Grid.Row="2">
<!--下面定义WarpPanel,使Item项在容器里从左到右从上到下排列-->
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<WrapPanel/>
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
</ListView>
参考资料:
>>WPF ListBox Tutorial
http://www.easck.com/uploadfile/mahesh/listbox-in-wpf/
>>Drag and drop, cut/copy and paste files with Windows Explorer
http://www.easck.com/Articles/14059/Drag-and-drop-cut-copy-and-paste-files-with-Window
>>Data Templating Overview
http://www.easck.com/en-us/library/ms742521.aspx
>>WPF ListBox Selection Color
http://www.easck.com/tutorials/wpf-tutorial-using-the-listview-part-3-in-place-edit
>>Creating a Custom Markup Extension in WPF (and soon, Silverlight)
http://www.easck.com/wpf/wpf35/wpf-35sp1-more-effects.aspx
>>WPF Tutorial - Controls and Layout
http://www.easck.com/~mossakow/materials/presentations/wpf.3.5/controls_layout/index.html
>>Grayscale Effect - A Pixel Shader Effect in WPF
http://www.easck.com/2008/06/grayscale-effect-pixel-shader-effect-in.html
>>ShaderPad - WPF ShaderEffects
http://www.easck.com/
希望本文所述对大家C#程序设计有所帮助。
注:相关教程知识阅读请移步到c#教程频道。










