Back to Devexpress

HamburgerSubMenuThemeSelectorBehavior.PreviewThemeNames Property

wpf-devexpress-dot-xpf-dot-windowsui-dot-hamburgersubmenuthemeselectorbehavior.md

latest4.0 KB
Original Source

HamburgerSubMenuThemeSelectorBehavior.PreviewThemeNames Property

Gets or sets themes that the HamburgerSubMenuThemeSelectorBehavior should display in the HamburgerSubMenu preview. This is a dependency property.

Namespace : DevExpress.Xpf.WindowsUI

Assembly : DevExpress.Xpf.Controls.v25.2.dll

NuGet Package : DevExpress.Wpf.Controls

Declaration

csharp
public string PreviewThemeNames { get; set; }
vb
Public Property PreviewThemeNames As String

Property Value

TypeDescription
String

Themes that the HamburgerSubMenuThemeSelectorBehavior should display in the HamburgerSubMenu preview.

|

Remarks

You can pass theme names to the PreviewThemeNames property to display themes in the HamburgerSubMenu preview. If you specify multiple themes, separate each theme with comma.

The following code sample displays VS2017Light, VS2017Dark, Office2019White, and Office2019HighContrast themes in the HamburgerSubMenu preview:

xaml
<Window ...
    xmlns:dxwui="http://schemas.devexpress.com/winfx/2008/xaml/windowsui"
    xmlns:dxmvvm="http://schemas.devexpress.com/winfx/2008/xaml/mvvm">
    <Grid>
        <dxwui:HamburgerMenu>
            <dxwui:HamburgerSubMenu>
                <dxmvvm:Interaction.Behaviors>
                    <dxwui:HamburgerSubMenuThemeSelectorBehavior PreviewThemeNames="VS2017Light,VS2017Dark,Office2019White,Office2019HighContrast"/>
                </dxmvvm:Interaction.Behaviors>
            </dxwui:HamburgerSubMenu>
        </dxwui:HamburgerMenu>
    </Grid>
</Window>

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the PreviewThemeNames property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

wpf-mvvm-behaviors-hamburger-based-theme-selector/CS/HamburgerSubMenuThemeSelectorBehavior/MainWindow.xaml#L15

xml
<dxmvvm:Interaction.Behaviors>
    <dxwui:HamburgerSubMenuThemeSelectorBehavior ShowTouchThemes="False" PreviewThemeNames="VS2017Light,VS2017Dark,Office2019White,Office2019HighContrast"/>
</dxmvvm:Interaction.Behaviors>

See Also

HamburgerSubMenuThemeSelectorBehavior Class

HamburgerSubMenuThemeSelectorBehavior Members

DevExpress.Xpf.WindowsUI Namespace