I've tested your solution and it seems to be in order:
MainWindow.xaml:
<Window x:Class="WpfApplication3.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="MainWindow" Height="350" Width="525">
<Grid>
<Grid.Resources>
<Style TargetType='{x:Type ListViewItem}'>
<Setter Property="ContextMenu" Value="{StaticResource TreeContextMenuTest}" />
</Style>
</Grid.Resources>
<ListView>
<ListViewItem>aaa</ListViewItem>
<ListViewItem>bbb</ListViewItem>
<ListViewItem>ccc</ListViewItem>
</ListView>
</Grid>
App.xaml:
<Application x:Class="WpfApplication3.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
StartupUri="MainWindow.xaml">
<Application.Resources>
<ContextMenu x:Key="TreeContextMenuTest" ItemsSource="{Binding ContextMenu}"/>
</Application.Resources>
App.xaml.cs:
public partial class App : Application
{
public ObservableCollection<MenuItem> ContextMenu { get; set; }
public App()
{
ContextMenu = new ObservableCollection<MenuItem>();
var mi = new MenuItem {Name = "Test"};
ContextMenu.Add(mi);
}
}
I don't know the way you used to populate your context menu items and I suggest rather then doing it in binding, do it in the xaml file, but a right click menu Item appeared, and if I changed it to standard population of menuItems, they also appeared properly.
Edit:
when saying standard population I meant as explained here:
http://wpftutorial.net/ContextMenu.html