ThemedWindow Class

A window that supports DevExpress WPF themes and Ribbon / Tab control integration.

Namespace: DevExpress.Xpf.Core

Assembly: DevExpress.Xpf.Core.v20.1.dll

Declaration

public class ThemedWindow :
    Window,
    IRibbonWindow,
    IHeaderItemsControlHost,
    IBackButtonSupport,
    IWindowSurrogate
Public Class ThemedWindow
    Inherits Window
    Implements IRibbonWindow,
               IHeaderItemsControlHost,
               IBackButtonSupport,
               IWindowSurrogate

Related API Members

The following members accept/return ThemedWindow objects:

Remarks

The ThemedWindow is a Window class descendant that supports DevExpress WPF themes.

ThemedWindow-ribbon-tab

Enable ThemedWindow

In Code

Follow the steps below to replace the standard Window class with the ThemedWindow:

  1. Change this:

    public partial class MainWindow : Window {
         //...
    }
    

    to this:

    using DevExpress.Xpf.Core;
    public partial class MainWindow : ThemedWindow {
         //...
    }
    
  2. Change this:

    <Window x:Class="Example.MainWindow"
    

    to this:

    <dx:ThemedWindow x:Class="Example.MainWindow"
    
  3. Add the missing reference:

    xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
    

With the Smart Tag

Select a window, click its Smart Tag, and click Convert to ThemedWindow. This converts the current Window to the ThemedWindow and updates XAML and CS files:

SmartTagsConvertTo

Integrate the Ribbon / Tab Control

Add the RibbonControl or TabControl to your application and specify the ThemedWindow.WindowKind property to integrate the control into the ThemedWindow:

<dx:ThemedWindow 
        ...
        xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
        xmlns:dxr="http://schemas.devexpress.com/winfx/2008/xaml/ribbon"
        WindowKind="Auto">
    <Grid>
        <dxr:RibbonControl RibbonStyle="Office2010">
            <!-- RibbonControl content -->
        </dxr:RibbonControl>
    </Grid>
</dx:ThemedWindow>

Customize the ThemedWindow

Acrylic Effect

Acrylic makes the ThemedWindow (including title bar) translucent to add a depth effect.

Set the ThemedWindow.EnableAcrylic to true to enable the Acrylic effect. You can use the ThemedWindow.AcrylicOpacity and ThemedWindow.AcrylicColor properties to customize the ThemedWindow's opacity and color.

WPF Acrylic Window - Color Property

Header / Toolbar Items

The ThemedWindow allows you to display items in the window's header area:

WPF Themed Window - Header / Toolbar Items

Refer to the ThemedWindow.HeaderItems or ThemedWindow.ToolbarItems property descriptions for a code sample.

Header Colors

You can use the ThemedWindow.HeaderBackground and ThemedWindow.HeaderForeground properties to specify the Header's Background and Foreground colors when the window is active.

WPF Themed Window - Header Background / Foreground

<dx:ThemedWindow
    ...
    HeaderBackground="DodgerBlue"
    HeaderForeground="White">
    ...
</dx:ThemedWindow>

Glow Colors

Set ThemedWindow.UseGlowColors to true to use custom colors for the window's glow effect. Use the ThemedWindow.ActiveGlowColor and ThemedWindow.InactiveGlowColor properties to specify a glow effect colors for active and inactive windows.

WPF Themed Window - Glow Colors

NOTE

The ThemedWindow.UseGlowColors is in effect only if the ThemedWindow.ShowGlow property is true.

Window Buttons

Use the ThemedWindow.ControlBoxButtonSet property to specify which buttons are displayed in the window's control box:

ThemedWindow ControlboxButtonsSet Property Result

<dx:ThemedWindow
  ...
  xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
  ControlboxButtonSet="Close,MaximizeRestore">
  ...
</dx:ThemedWindow>

ThemedWindowDialog

Use the ShowDialog method overloads to display a ThemedWindowDialog.

See Also