Context when binding a list of ViewModels to MenuItems

Jan 29, 2013 at 6:25 PM

I have a dynamic Menu that is bound to a IEnumerable of ViewModels using Caliburn

<MenuItem x:Name="Views" DisplayMemberPath="Title" Header="_View" cal:Message.Attach="ShowView($orignalsourcecontext)" />

On the ViewModel for each item I have a Icon property, i cant bind to this because the Context of each MenuItem is not the item viewmodel its the Parent that olds the "Views" IEnumerable

<MenuItem x:Name="Views" DisplayMemberPath="Title" Header="_View" cal:Message.Attach="ShowView($orignalsourcecontext)">
                    <MenuItem.Icon>
                        <Image Source="{Binding Icon}"/>
                    </MenuItem.Icon>
</MenuItem>

How can i get it right?