itemscontrolがCollectionViewSourceに対してバインドされているビューモデルのデータテンプレートがあります(xamlでの並べ替えを有効にするため)。
<DataTemplate x:Key="equipmentDataTemplate">
<Viewbox>
<Viewbox.Resources>
<CollectionViewSource x:Key="viewSource" Source="{Binding Modules}">
<CollectionViewSource.SortDescriptions>
<scm:SortDescription PropertyName="ID" Direction="Ascending"/>
</CollectionViewSource.SortDescriptions>
</CollectionViewSource>
</Viewbox.Resources>
<ItemsControl ItemsSource="{Binding Source={StaticResource viewSource}}"
Height="{DynamicResource equipmentHeight}"
ItemTemplate="{StaticResource moduleDataTemplate}">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<StackPanel Orientation="Horizontal" />
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
</ItemsControl>
</Viewbox>
</DataTemplate>
また、設計時データを提供するためにこれらすべてが定義されているUserControlをセットアップしました
d:DataContext="{x:Static vm:DesignTimeHelper.Equipment}">
これは基本的に、ModuleViewModels(Equipment.Modules)のリストを持つEquipmentViewModelを提供する静的プロパティです。これで、CollectionViewSourceにバインドしている限り、デザインタイムデータはブレンド3に表示されません。ViewModelコレクションに直接バインドすると
<ItemsControl ItemsSource="{Binding Modules}"
デザインタイムのデータを見ることができます。私に何ができるか考えてみませんか?