環境 Windows 8 RP + Visual Studio 2012 RC
クイック スタート: ListView コントロールと GridView コントロールの追加
デフォルトでは、IsSourceGrouped=”true” となっていて、AllGroups の中身に対して列挙されます。
<CollectionViewSource
x:Name=”groupedItemsViewSource”
Source=”{Binding Groups}”
IsSourceGrouped=”true”
ItemsPath=”TopItems”
d:Source=”{Binding AllGroups, Source={d:DesignInstance Type=data:RssDataSource, IsDesignTimeCreatable=True}}”/>
これを一段上のAllGroup に対して列挙したい場合は、IsSourceGrouped を false に設定します。
protected override void LoadState(Object navigationParameter, Dictionary<String, Object> pageState)
{
var sampleDataGroups = RssDataSource.GetGroups(“AllGroups”);
this.DefaultViewModel[“Groups”] = sampleDataGroups;
}
<CollectionViewSource
x:Name=”groupedItemsViewSource”
Source=”{Binding Groups}”
IsSourceGrouped=”false”
ItemsPath=”TopItems”
d:Source=”{Binding AllGroups, Source={d:DesignInstance Type=data:RssDataSource, IsDesignTimeCreatable=True}}”/>
難しい・・・
コメントを残す