In my previous post I have explained how to customize the appearance of the AgMenu Control. The template for it needs to be updated a bit to properly work with the 9.2 build.
List of changes:
- AgMenuDefaultStyleHelper, AgSubMenuDefaultStyleHelper and the like have been moved to a separate namespace clr-namespace:DevExpress.AgMenu.DefaultStyle
- AgMenuItemContentPresenter has been moved to clr-namespace:DevExpress.AgMenu.Internal
- AgMenuItemContentPresenter.CheckShowing has been renamed to CheckAreaVisibility
- AgMenuItemContentPresenter.VisualPosition has been renamed to Position
To make it a bit more interesting, I made the template look like the Darkroom Skin
and moved the XAML into a separate file so that it can be reused. To add it to your app, simply merge the AgMenu.xaml into your application resources.
<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="Assets/DevExpress/AgMenu.xaml"/>
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Application.Resources>
and then apply it to your AgMenu
<dxm:AgMenu Style="{StaticResource AgMenu;DarkRoom}">
<dxm:AgMenuItem Header="File">
<dxm:AgMenuItem Header="New">
<dxm:AgMenuItem Header="Contact"></dxm:AgMenuItem>
<dxm:AgMenuItem Header="Database"></dxm:AgMenuItem>
</dxm:AgMenuItem>
<dxm:AgMenuItem Header="Edit"></dxm:AgMenuItem>
<dxm:AgMenuItem Header="Delete"></dxm:AgMenuItem>
</dxm:AgMenuItem>
<dxm:AgMenuItem Header="Help">
</dxm:AgMenuItem>
</dxm:AgMenu>
Download the AgMenu 9.2 Darkroom Template (Right click: Save As…)
Cheers,
Azret