私はここで何か間違っていると確信していますが、モジュールに定義されたビューにAutowireViewModelアタッチプロパティを設定すると、ビューモデルを自動配線できません。インスタンス化されたビューモデルは表示されません。私のサンプルプロジェクトはgithubのであるプリズムモジュール内でAutowireViewModelが機能しない
<UserControl x:Class="MainModule.ToolbarWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mvvm="clr-namespace:Microsoft.Practices.Prism.Mvvm;assembly=Microsoft.Practices.Prism.Mvvm.Desktop"
mvvm:ViewModelLocator.AutoWireViewModel="True"
mc:Ignorable="d"
d:DesignHeight="300" d:DesignWidth="300">
<StackPanel>
<Label>Test</Label>
<Label Content="{Binding Name}"></Label>
</StackPanel>
https://github.com/rohits79/PrismAutoWire/tree/master/Prism%20App/MainModule
あなたは名前空間が間違っているんだhttps://github.com/rohits79/PrismAutoWire/blob/master/Prism%20App/Prism%20App/Bootstrapper.cs#L34
でもう必要ありませんがItemsControlにのItemTemplateにに使用されるユーザーコントロールですか? – Clemens
いいえ、githubのソースコードを見てください –