DevExpress/DX_WPF

[DX_WPF] HamburgerMenu

딸기우유중독 2024. 4. 15. 15:43

 

사용

 

Nuget Install

DevExpress.Wpf.Controls


 

https://nuget.devexpress.com/packages/DevExpress.Wpf.Controls/24.1.6

 

Log In

 

www.devexpress.com

 

 


 

 

 

 

Content에 넣어주고

CompactOverlayStateThreshold="NaN" 하면

필때 Layout 조정 적용 됨.

<dxwui:HamburgerMenu.Content>

 

 

 

 

StackPanel로도 가능

 

 

 


 

MVVM Support

 

 

 

 

 

 


 

TemplateSelector 따로 빼서 ResourceDirectory에 넣기.

 

MainView.xaml

 

 

HamburgerMenuTemplateSelector.xaml


 

 

https://docs.devexpress.com/WPF/119474/controls-and-libraries/windows-modern-ui/hamburger-menu/mvvm-support

 

WPF Hamburger Menu: MVVM Support | WPF Controls | DevExpress Documentation

The Hamburger Menu allows you to implement the MVVM design pattern. Use the HamburgerMenuNavigationButtonBase .NavigationTargetTypeName or HamburgerMenuNavigationButtonBase .NavigationTargetType property to specify the navigation target page for a button.

docs.devexpress.com

 

 

 


 

 

ContextMenu

 

 

https://learn.microsoft.com/ko-kr/dotnet/desktop/wpf/controls/contextmenu-overview?view=netframeworkdesktop-4.8

 

ContextMenu 개요 - WPF .NET Framework

이 문서에서는 상황에 맞는 메뉴를 사용하여 기능을 노출하는 요소를 나타내는 ContextMenu 클래스에 대한 개요를 제공합니다.

learn.microsoft.com

 

https://stackoverflow.com/questions/3583507/wpf-binding-a-contextmenu-to-an-mvvm-command

 

WPF: Binding a ContextMenu to an MVVM Command

Let's say I have a Window with a property returning a Command (in fact, it's a UserControl with a Command in a ViewModel class, but let's keep things as simple as possible to reproduce the problem)...

stackoverflow.com

 

https://docs.devexpress.com/Win10Apps/212361/controls/navigation-and-layout/hamburger-menu/visual-elements/context-menus

 

Context Menus | Windows 10 App Controls | DevExpress Documentation

The Hamburger Menu provides context menus that can be invoked by right-clicking Main Menu or Sub Menu items and provide the ability to perform actions linked to these items. To add a context menu to a Main Menu item, assign it to the item’s HamburgerMenu

docs.devexpress.com

 

728x90