I'm trying to bind IsChecked to the Selected DependancyProperty on the object I'm displaying, this code appears to work, but submenus don't show up if I use it. Is this the right way to go about it, and how do I fix the problem?
<MenuItem Header="Window" Name="windowMenu" ItemsSource="{Binding}">
<MenuItem.ItemContainerStyle>
<Style>
<Setter Property="MenuItem.IsChecked" Value="{Binding Path=Selected}" />
<Setter Property="MenuItem.IsCheckable" Value="true" />
</Style>
</MenuItem.ItemContainerStyle>
</MenuItem>