すべての UI がテンプレートを使用して生成されるカスタム ピボット コントロールがあります。次のようになります。
<controls:Pivot ItemsSource="{Binding superSets}">
<controls:Pivot.HeaderTemplate>
<DataTemplate>
<TextBlock Text="{Binding Name}"></TextBlock>
</DataTemplate>
</controls:Pivot.HeaderTemplate>
<controls:Pivot.ItemTemplate>
<DataTemplate>
<ListBox ItemsSource="{Binding Source={StaticResource SortedNews}}">
<ListBox.ItemTemplate>
<!- datatemplate Code -->
</ListBox.ItemTemplate>
</ListBox>
</DataTemplate>
</controls:Pivot.ItemTemplate>
</controls:Pivot>
今、リストボックスの内容をソートしたいので、コレクションビューソースを次のように設計しました:
<CollectionViewSource x:Key="SortedNews" Source="{Binding Path=Articles}">
<CollectionViewSource.SortDescriptions>
<scm:SortDescription PropertyName="Pubdate"></scm:SortDescription>
</CollectionViewSource.SortDescriptions>
</CollectionViewSource>
についてsuperSets
: Observable コレクション型のプロパティが含まれていますArticles
プログラムを実行すると、次のエラーが表示されますProperty 'Articles' not found
何か案は?