Hi,
the
ItemsSource
property of the
Menu
or
MenuItem
expects an collection of other items.
So your binding will not work.
You could define in the
Menus.xaml
a
CompositeCollection
of
MenuItem
's and bind these to
Menu
or
MenuItem
like so:
<CompositeCollection x:key="MenuTest">
<MenuItem Header="_Proxy">
<MenuItem Header="_Connect" />
<MenuItem Header="_Disconnect" />
</MenuItem>
</CompositeCollection>
And in your Window:
<Menu ItemsSource="{StaticResource MenuTest}" />
or
<Menu>
<MenuItem Header="TestMenu" ItemsSource="{StaticResource MenuTest}" />
</Menu>
Hope this helps,
Thomas.