I've got this menu bound to an ObservableCollection called MainMenuPageItems, in which there are objects that have a Title property:
<Menu DockPanel.Dock="Top">
<MenuItem Header="_File">
<MenuItem Command="{Binding ExitCommand}" Header="E_xit" InputGestureText="Ctrl-X" />
</MenuItem>
<MenuItem Header="Code _Generation" ItemsSource="{Binding MainMenuPageItems}"
ItemTemplate="StaticResource CodeGenerationTemplate"/>
</Menu>
This is my DataTemplate:
<DataTemplate x:Key="CodeGenerationTemplate">
<MenuItem Header="{Binding Title}"/>
</DataTemplate>
But I get the error "The type DataTemplate does not have a public type converter class." What do I need to change so I don't get this error?