<a href="http://files.cnblogs.com/webabcd/Windows10.rar">[源碼下載下傳]</a>
背水一戰 Windows 10 (52) - 控件(集合類): ItemsControl - 自定義 ItemsControl, 自定義 ContentPresenter
介紹
背水一戰 Windows 10 之 控件(集合類 - ItemsControl)
自定義 ItemsControl(自定義 GirdView 使其每個 item 占用不同大小的空間)
自定義 ContentPresenter 實作類似 GridViewItemPresenter 和 ListViewItemPresenter 的效果
示例
1、自定義 ItemsControl(自定義 GirdView 使其每個 item 占用不同大小的空間)
Controls/CollectionControl/ItemsControlDemo/MyItemsControlDemo.xaml
Controls/CollectionControl/ItemsControlDemo/MyItemsControlDemo.xaml.cs
2、自定義 ContentPresenter 實作類似 GridViewItemPresenter 和 ListViewItemPresenter 的效果
Controls/CollectionControl/ItemsControlDemo/MyItemPresenter.cs
Controls/CollectionControl/ItemsControlDemo/MyItemPresenterDemo.xaml
Controls/CollectionControl/ItemsControlDemo/MyItemPresenterDemo.xaml.cs
OK