Doh,
Dmitry, Application.Current doesn't have a property Width...
Use Grid instead of DockPanel:
<Page xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Grid>
<Menu Name="menu1" VerticalAlignment="Top">
<MenuItem Header="File">
<MenuItem Header="Open"/>
<MenuItem Header="Close"/>
</MenuItem>
</Menu>
</Grid>
</Page>
Don't overcomplicate things. And I really encourage you to read wonderful Dr. WPF articles: ItemsControl from A to Z
Cheers, Anvaka
Anvaka
2010-02-18 14:40:19