Skip to main content

FluenceWindow

Description​

FluenceWindow derives from WPF Window. It provides custom DWM window chrome, optional content in the title bar, caption button controls, and Fluence theme integration. Its properties below extend the normal WPF window API. For a C#-only window setup, see Create a Fluence window from C#.

Use it as the main window when an app needs Fluence chrome, a custom title bar, or a system backdrop.

FluenceWindow in light mode FluenceWindow in dark mode

Example usage​

Initialize the theme before creating or showing a window. Remove StartupUri from App.xaml when creating the window in OnStartup, as described in C# basic usage. SystemBackdropType is a per-window request. The default is Auto; the operating system and current theme determine the available effect.

<fluence:FluenceWindow x:Class="MyApp.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:fluence="http://schemas.fluencewpf.com"
Title="My app"
Width="900"
Height="640"
SystemBackdropType="Auto"
CornerStyle="Round">
<Grid />
</fluence:FluenceWindow>

The FluenceWindow dependency properties add to, rather than replace, inherited Window properties such as Title, Width, Height, ResizeMode, WindowStartupLocation, Owner, and Content.

State and behavior​

FluenceWindow properties​

PropertyDefaultPurpose
SystemBackdropTypeWindowBackdropType.AutoRequests Auto, Mica, Acrylic, Tabbed, or None for this window.
CornerStyleWindowCornerPreference.RoundRequests Default, DoNotRound, Round, or RoundSmall corners. Windows may ignore unsupported requests.
ExtendsContentIntoTitleBarfalseExtends the client area into the title bar region. Set true when supplying a custom title bar.
TitleBarnullOptional UIElement used as custom title-bar content. SetTitleBar(UIElement?) is also available.
TitleBarHeight48 device-independent unitsHeight of the title-bar hit-test region.
ShowIcon, ShowTitletrueControls the standard icon and title display.
IsMinimizeButtonVisible, IsMaximizeButtonVisible, IsCloseButtonVisibleVisibility.VisibleOverrides visibility for the corresponding caption control.
IsMinimizable, IsMaximizable, IsClosabletrueEnables or disables the corresponding caption action.
IsMoveabletrueAllows dragging the window from noninteractive title-bar space.
HasShadowtrueRequests the window shadow.
MarginMaximizedThickness(0)Maximized frame margin used by the custom chrome implementation. Normally leave the system-calculated value alone.

The visibility and capability properties serve different purposes: visibility controls whether a caption button is shown, while the Is*able properties control whether the action is permitted. ResizeMode remains a WPF constraint and can also limit minimize/maximize behavior.

Backdrops and platform behavior​

ApplicationThemeManager.Apply(theme, backdrop) records an application-level backdrop request and raises the manager change event when appropriate. FluenceWindow does not read CurrentBackdrop as a global default: choose the requested effect on each window with SystemBackdropType.

Mica, Acrylic, Tabbed, and rounded-corner requests depend on Windows capabilities. Windows 11 uses DWM system backdrop support where available. On Windows 10, the library uses its documented fallback; high contrast uses an opaque surface. The OS can ignore unsupported corner requests. See the compatibility guide.

FluenceWindow begins watching relevant system theme changes when its native window is initialized and updates its chrome accordingly. Call ApplicationThemeManager.Apply before showing windows so Fluence resources are ready.

Reference​