Menu in the title bar of the WPF window

How can the DevExpress menu appear in the title bar of a WPF window, for example below?

Menu displayed on window title bar

Right now I have a main menu attached to the window, but I would like to move it to the window title

<dxb:BarManager CreateStandardLayout="True"> <dxb:BarManager.Bars> <dxb:Bar IsMainMenu="True" UseWholeRow="True"> <dxb:Bar.DockInfo> <dxb:BarDockInfo ContainerType="Top" /> </dxb:Bar.DockInfo> </dxb:Bar> </dxb:BarManager.Bars> </dxb:BarManager> 
+4
source share
1 answer
  <Window x:Class="WpfApplication11.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:dxc="http://schemas.devexpress.com/winfx/2008/xaml/core" xmlns:dxb="http://schemas.devexpress.com/winfx/2008/xaml/bars" WindowStyle="None" Title="MainWindow" Height="350" Width="525"> <Grid> <dxb:BarManager CreateStandardLayout="True"> <dxb:BarManager.Items> <dxb:BarButtonItem x:Name="barButtonItem1" Content="test"/> <dxb:BarButtonItem x:Name="barButtonItem2" Content="test2"/> </dxb:BarManager.Items> <dxb:BarManager.Bars> <dxb:Bar IsMainMenu="True" Caption="test1"> <dxb:Bar.DockInfo> <dxb:BarDockInfo ContainerType="Top" /> </dxb:Bar.DockInfo> <dxb:BarButtonItemLink BarItemName="barButtonItem1"/> <dxb:BarButtonItemLink BarItemName="barButtonItem2"/> </dxb:Bar> </dxb:BarManager.Bars> </dxb:BarManager> </Grid> </Window> 
0
source

Source: https://habr.com/ru/post/1495265/


All Articles