wpf-devexpress-dot-xpf-dot-core-dot-themedwindow-34e59f46.md
Gets or sets whether the operating system’s native window is used to round a ThemedWindow instance’s corners.
Namespace : DevExpress.Xpf.Core
Assembly : DevExpress.Xpf.Core.v25.2.dll
NuGet Package : DevExpress.Wpf.Core
public static bool UseNativeWindow { get; set; }
Public Shared Property UseNativeWindow As Boolean
| Type | Description |
|---|---|
| Boolean |
true to use the operating system’s native window; otherwise, false.
|
The following code sample sets the UseNativeWindow property to true to round ThemedWindow corners:
using DevExpress.Xpf.Core;
//...
public partial class App {
protected override void OnStartup(StartupEventArgs e) {
base.OnStartup(e);
ThemedWindow.UseNativeWindow = true;
}
}
Imports DevExpress.Xpf.Core
Public Partial Class App
Protected Overrides Sub OnStartup(ByVal e As StartupEventArgs)
MyBase.OnStartup(e)
ThemedWindow.UseNativeWindow = True
End Sub
End Class
DevExpress WPF Controls include the UseNativeWindow and ThemedWindow.RoundCorners properties that allow you to round window corners and replicate the Windows 11 application appearance.
The following table describes whether your application’s corners are rounded depending on your Windows version, applied DevExpress Theme, and the UseNativeWindow and RoundCorners property values:
|
Windows Version
|
Applied DevExpress Theme
|
UseNativeWindow
|
| | --- | --- | --- | --- | |
true
|
false
|
true
|
false
| | --- | --- | --- | --- | |
Windows 11
|
|
|
|
|
| |
non-Win11Light/Win11Dark
|
|
|
|
| |
Windows 10 and earlier
|
|
|
|
|
| |
non-Win11Light/Win11Dark
|
|
|
|
|
If the UseNativeWindow and ThemedWindow.EnableAcrylic property values are true, your application’s appearance will be broken.
If the UseNativeWindow property’s value is true, the ThemedWindow.UseGlowColors property has no effect.
Footnotes
See Also