c# - Partially filling a MenuItem through binding -


i want use list of custom objects generate list of menuitems in menu, @ bottom of menu want couple of static menuitems appear. logically in head, can done programatically creating list bind has menuitems @ bottom, strikes me bit of naive way of approaching this. i'm sure there's more elegant way list have along xaml wizardry, possibly kind of datatemplate. pointers?

like mcgarnagle said, can use compositecollection. however, don't need create resource fixed menu items. can place them directly in compositecollection this:

<menu>     <menu.itemssource>         <compositecollection>             <collectioncontainer collection="{binding path=myitems}" />             <separator/>             <menuitem header="fixed item 1" />             <menuitem header="fixed item 2" />         </compositecollection>     </menu.itemssource> </menu> 

Comments