I need to change how the context menu displays (some "fancy" border, background and other decoration) and want to use the ControlTemplate for this. Currently my xaml looks like this:
<ig:XamContextMenu.Template>
<ControlTemplate>
<Grid>
<ContentPresenter />
</Grid>
</ControlTemplate>
</ig:XamContextMenu.Template>
Nothing fancy yet, I just want to get started with displaying the menu items first. As far as I know the ContentPresenter tag should take care of that. However I get nothing. If I put some other stuff inside the Grid tags, like a TextBlock, it shows up when the menu is called upon.
What basic stuff am I missing in order to get the menu items displayed inside the ContentPresenter?
Thanks in advance.
Hi Mikael,
Glad you found the solution.
You might also want to take a look at a thread with Krasimir, it includes a sample. It demonstrates binding ItemTemplate and HierarchicalItemTemplate.
How to bind Dynamic Hierarchical Data to XamContextMenu
http://ko.infragistics.com/community/forums/t/57250.aspx
Please let me know if you have any questions.
Well, I found it. Turns out (of course) that I have to use <ItemsPresenter />instead of <ContentPresenter />.
Case closed.