次ContextMenuのApp.xamlような があります。
<ContextMenu x:Key="TreeContextMenuTest" ItemsSource="{Binding ContextMenu}">....
次にListView、アイテムが でスタイル設定されている がありますThemes/Generic.xaml。こんな感じです(不要なものは削除しました。スタイルは適切に適用されており、コンテキストメニューの添付方法についてのみ質問があります)
<Style TargetType='{x:Type ListViewItem}'>
<Setter Property="ContextMenu" Value="{StaticResource TreeContextMenuTest}" />
</Style>
ただし、DependencyProperty.UnsetValue is not a valid value for property ContextMenuエラーが発生します。何か案は?