diff --git a/.editorconfig b/.editorconfig
index 979b3a007..833e151fa 100644
--- a/.editorconfig
+++ b/.editorconfig
@@ -350,6 +350,8 @@ dotnet_diagnostic.IDE0073.severity = error
dotnet_diagnostic.IDE0058.severity = silent
+dotnet_diagnostic.MC3080.severity = none
+
# StyleCop Code Analysis
# Closing parenthesis should be spaced correctly: "foo()!"
diff --git a/.github/workflows/wpf-ui-cd-docs.yaml b/.github/workflows/wpf-ui-cd-docs.yaml
index 1464f4dc6..ba0368dcf 100644
--- a/.github/workflows/wpf-ui-cd-docs.yaml
+++ b/.github/workflows/wpf-ui-cd-docs.yaml
@@ -33,10 +33,10 @@ jobs:
uses: actions/setup-node@v4
with:
node-version: 18.x
- - name: Setup .NET Core SDK 9.x
+ - name: Setup .NET Core SDK 10.x
uses: actions/setup-dotnet@v4
with:
- dotnet-version: 9.x
+ dotnet-version: 10.x
- name: Install docfx
run: dotnet tool update -g docfx
diff --git a/.github/workflows/wpf-ui-cd-extension.yaml b/.github/workflows/wpf-ui-cd-extension.yaml
index 2635972b5..7dcb8f0c1 100644
--- a/.github/workflows/wpf-ui-cd-extension.yaml
+++ b/.github/workflows/wpf-ui-cd-extension.yaml
@@ -24,10 +24,10 @@ jobs:
run: nuget restore Wpf.Ui.sln
- name: Build the solution
- run: msbuild src\Wpf.Ui.Extension\Wpf.Ui.Extension.csproj /t:Rebuild -p:Configuration=Release -p:RestorePackages=false -p:Platform="x64" -p:ProductArchitecture="amd64" -p:GITHUB_ACTIONS=True
+ run: msbuild src\Wpf.Ui.Extension\Wpf.Ui.Extension.csproj /t:Rebuild -p:Configuration=Release -p:RestorePackages=false -p:Platform="x64" -p:ProductArchitecture="amd64" -p:GITHUB_ACTIONS=True -p:LangVersion=8.0
- name: Build the solution
- run: msbuild src\Wpf.Ui.Extension\Wpf.Ui.Extension.csproj /t:Rebuild -p:Configuration=Release -p:RestorePackages=false -p:Platform="arm64" -p:ProductArchitecture="arm64" -p:GITHUB_ACTIONS=True
+ run: msbuild src\Wpf.Ui.Extension\Wpf.Ui.Extension.csproj /t:Rebuild -p:Configuration=Release -p:RestorePackages=false -p:Platform="arm64" -p:ProductArchitecture="arm64" -p:GITHUB_ACTIONS=True -p:LangVersion=8.0
- uses: actions/upload-artifact@v4
with:
diff --git a/.github/workflows/wpf-ui-cd-nuget.yaml b/.github/workflows/wpf-ui-cd-nuget.yaml
index de485012d..6af161ed3 100644
--- a/.github/workflows/wpf-ui-cd-nuget.yaml
+++ b/.github/workflows/wpf-ui-cd-nuget.yaml
@@ -21,10 +21,10 @@ jobs:
- uses: nuget/setup-nuget@v2
with:
nuget-api-key: ${{ secrets.NUGET_API_KEY }}
- - name: Setup .NET Core SDK 9.x
+ - name: Setup .NET Core SDK 10.x
uses: actions/setup-dotnet@v4
with:
- dotnet-version: 9.x
+ dotnet-version: 10.x
- name: Fetch the certificate
run: |
@@ -49,9 +49,11 @@ jobs:
run: dotnet build src\Wpf.Ui.Tray\Wpf.Ui.Tray.csproj --configuration Release --no-restore -p:SourceLinkEnabled=true
- name: Publish the package to NuGet.org
+ continue-on-error: true
run: nuget push **\*.nupkg -NonInteractive -SkipDuplicate -Source 'https://api.nuget.org/v3/index.json'
- name: Publish the symbols to NuGet.org
+ continue-on-error: true
run: nuget push **\*.snupkg -NonInteractive -SkipDuplicate -Source 'https://api.nuget.org/v3/index.json'
- name: Upload NuGet packages as artifacts
diff --git a/.github/workflows/wpf-ui-pr-validator.yaml b/.github/workflows/wpf-ui-pr-validator.yaml
index 7a641dcac..28323af9f 100644
--- a/.github/workflows/wpf-ui-pr-validator.yaml
+++ b/.github/workflows/wpf-ui-pr-validator.yaml
@@ -17,10 +17,10 @@ jobs:
- uses: nuget/setup-nuget@v2
with:
nuget-api-key: ${{ secrets.NUGET_API_KEY }}
- - name: Setup .NET Core SDK 9.x
+ - name: Setup .NET Core SDK 10.x
uses: actions/setup-dotnet@v4
with:
- dotnet-version: 9.x
+ dotnet-version: 10.x
- name: Install dependencies
run: dotnet restore
diff --git a/Directory.Build.props b/Directory.Build.props
index 32d5b3484..573a58be1 100644
--- a/Directory.Build.props
+++ b/Directory.Build.props
@@ -4,8 +4,8 @@
$(RepositoryDirectory)build\
- 4.0.3
- 4.0.0
+ 4.1.0
+ 4.1.0
lepo.co
@@ -38,7 +38,7 @@
true
- 13.0
+ 14.0
enable
-
\ No newline at end of file
+
diff --git a/src/Wpf.Ui.Extension.Template.Compact/Wpf.Ui.Compact.csproj b/src/Wpf.Ui.Extension.Template.Compact/Wpf.Ui.Compact.csproj
index c3e6c37a1..9eb338561 100644
--- a/src/Wpf.Ui.Extension.Template.Compact/Wpf.Ui.Compact.csproj
+++ b/src/Wpf.Ui.Extension.Template.Compact/Wpf.Ui.Compact.csproj
@@ -2,7 +2,7 @@
WinExe
- net9.0-windows
+ net10.0-windows
app.manifest
wpfui-icon.ico
true
@@ -15,9 +15,9 @@
-
-
-
+
+
+
diff --git a/src/Wpf.Ui.Extension.Template.Compact/Wpf.Ui.Extension.Template.Compact.csproj b/src/Wpf.Ui.Extension.Template.Compact/Wpf.Ui.Extension.Template.Compact.csproj
index 048d060ea..7d3005c5c 100644
--- a/src/Wpf.Ui.Extension.Template.Compact/Wpf.Ui.Extension.Template.Compact.csproj
+++ b/src/Wpf.Ui.Extension.Template.Compact/Wpf.Ui.Extension.Template.Compact.csproj
@@ -11,6 +11,7 @@
15.0
win;win-x64;win-arm64
+ 8.0
true
@@ -118,4 +119,4 @@
-->
-
\ No newline at end of file
+
diff --git a/src/Wpf.Ui.Extension.Template.Fluent/Wpf.Ui.Extension.Template.Fluent.csproj b/src/Wpf.Ui.Extension.Template.Fluent/Wpf.Ui.Extension.Template.Fluent.csproj
index e04283f59..e4ba5bf9b 100644
--- a/src/Wpf.Ui.Extension.Template.Fluent/Wpf.Ui.Extension.Template.Fluent.csproj
+++ b/src/Wpf.Ui.Extension.Template.Fluent/Wpf.Ui.Extension.Template.Fluent.csproj
@@ -11,6 +11,7 @@
15.0
win;win-x64;win-arm64
+ 8.0
true
@@ -118,4 +119,4 @@
-->
-
\ No newline at end of file
+
diff --git a/src/Wpf.Ui.Extension.Template.Fluent/Wpf.Ui.Fluent.csproj b/src/Wpf.Ui.Extension.Template.Fluent/Wpf.Ui.Fluent.csproj
index c3e6c37a1..9eb338561 100644
--- a/src/Wpf.Ui.Extension.Template.Fluent/Wpf.Ui.Fluent.csproj
+++ b/src/Wpf.Ui.Extension.Template.Fluent/Wpf.Ui.Fluent.csproj
@@ -2,7 +2,7 @@
WinExe
- net9.0-windows
+ net10.0-windows
app.manifest
wpfui-icon.ico
true
@@ -15,9 +15,9 @@
-
-
-
+
+
+
diff --git a/src/Wpf.Ui.Extension/Wpf.Ui.Extension.csproj b/src/Wpf.Ui.Extension/Wpf.Ui.Extension.csproj
index 25869e60c..757b57fb5 100644
--- a/src/Wpf.Ui.Extension/Wpf.Ui.Extension.csproj
+++ b/src/Wpf.Ui.Extension/Wpf.Ui.Extension.csproj
@@ -2,7 +2,8 @@
$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)
- latest
+ true
+ 8.0
17.0
win;win-x64;win-arm64
@@ -127,4 +128,4 @@
-
\ No newline at end of file
+
diff --git a/src/Wpf.Ui.FlaUI/Wpf.Ui.FlaUI.csproj b/src/Wpf.Ui.FlaUI/Wpf.Ui.FlaUI.csproj
index 3e5a16882..ccb9cc53a 100644
--- a/src/Wpf.Ui.FlaUI/Wpf.Ui.FlaUI.csproj
+++ b/src/Wpf.Ui.FlaUI/Wpf.Ui.FlaUI.csproj
@@ -2,7 +2,7 @@
WPF-UI.FlaUI
- net9.0-windows;net8.0-windows;net481;
+ net10.0-windows;net9.0-windows;net8.0-windows;net481;
FlaUI automation library integration for WPF UI library.
$(CommonTags);syntax;highlight;flaui;fla;ui;ua3;ua2;ui;automation
true
@@ -13,18 +13,10 @@
-
- all
- build; analyzers
-
all
runtime; build; native; contentfiles; analyzers; buildtransitive
-
- all
- runtime; build; native; contentfiles; analyzers; buildtransitive
-
-
\ No newline at end of file
+
diff --git a/src/Wpf.Ui.FontMapper/Wpf.Ui.FontMapper.csproj b/src/Wpf.Ui.FontMapper/Wpf.Ui.FontMapper.csproj
index 4b231cae5..906d93c6d 100644
--- a/src/Wpf.Ui.FontMapper/Wpf.Ui.FontMapper.csproj
+++ b/src/Wpf.Ui.FontMapper/Wpf.Ui.FontMapper.csproj
@@ -2,7 +2,7 @@
Exe
- net9.0
+ net10.0
diff --git a/src/Wpf.Ui.Gallery/Wpf.Ui.Gallery.csproj b/src/Wpf.Ui.Gallery/Wpf.Ui.Gallery.csproj
index 6ecc4de7a..0214d6a5a 100644
--- a/src/Wpf.Ui.Gallery/Wpf.Ui.Gallery.csproj
+++ b/src/Wpf.Ui.Gallery/Wpf.Ui.Gallery.csproj
@@ -3,7 +3,7 @@
Wpf.Ui.Gallery
WinExe
- net9.0-windows10.0.26100.0
+ net10.0-windows10.0.26100.0
10.0.18362.0
true
true
@@ -69,10 +69,6 @@
-
- all
- runtime; build; native; contentfiles; analyzers; buildtransitive
-
all
runtime; build; native; contentfiles; analyzers; buildtransitive
diff --git a/src/Wpf.Ui.SyntaxHighlight/Wpf.Ui.SyntaxHighlight.csproj b/src/Wpf.Ui.SyntaxHighlight/Wpf.Ui.SyntaxHighlight.csproj
index 0b7080a5f..887e2b9bf 100644
--- a/src/Wpf.Ui.SyntaxHighlight/Wpf.Ui.SyntaxHighlight.csproj
+++ b/src/Wpf.Ui.SyntaxHighlight/Wpf.Ui.SyntaxHighlight.csproj
@@ -2,7 +2,7 @@
WPF-UI.SyntaxHighlight
- net462;net472;net481;net6.0-windows;net8.0-windows;net9.0-windows
+ net10.0-windows;net9.0-windows;net8.0-windows;net481;net472;net462
Native tast notification support for WPF using the WPF UI library.
$(CommonTags);syntax;highlight
true
@@ -34,18 +34,10 @@
-
- all
- build; analyzers
-
all
runtime; build; native; contentfiles; analyzers; buildtransitive
-
- all
- runtime; build; native; contentfiles; analyzers; buildtransitive
-
diff --git a/src/Wpf.Ui.ToastNotifications/Wpf.Ui.ToastNotifications.csproj b/src/Wpf.Ui.ToastNotifications/Wpf.Ui.ToastNotifications.csproj
index 0d5648e1b..3e7975bd0 100644
--- a/src/Wpf.Ui.ToastNotifications/Wpf.Ui.ToastNotifications.csproj
+++ b/src/Wpf.Ui.ToastNotifications/Wpf.Ui.ToastNotifications.csproj
@@ -2,7 +2,7 @@
WPF-UI.ToastNotifications
- net462;net472;net481;net6.0-windows;net8.0-windows;net9.0-windows
+ net10.0-windows;net9.0-windows;net8.0-windows;net481;net472;net462
Native tast notification support for WPF using the WPF UI library.
$(CommonTags);toast;notifications
true
@@ -19,18 +19,10 @@
-
- all
- build; analyzers
-
all
runtime; build; native; contentfiles; analyzers; buildtransitive
-
- all
- runtime; build; native; contentfiles; analyzers; buildtransitive
-
diff --git a/src/Wpf.Ui.Tray/Wpf.Ui.Tray.csproj b/src/Wpf.Ui.Tray/Wpf.Ui.Tray.csproj
index b06f1e6d5..a33fde3a9 100644
--- a/src/Wpf.Ui.Tray/Wpf.Ui.Tray.csproj
+++ b/src/Wpf.Ui.Tray/Wpf.Ui.Tray.csproj
@@ -2,7 +2,7 @@
WPF-UI.Tray
- net462;net472;net481;net6.0-windows;net8.0-windows;net9.0-windows
+ net10.0-windows;net9.0-windows;net8.0-windows;net481;net472;net462
Native tray menu icon support for WPF using the WPF UI library.
$(CommonTags);tray;notifyicon;notify
true
@@ -35,18 +35,10 @@
-
- all
- build; analyzers
-
all
runtime; build; native; contentfiles; analyzers; buildtransitive
-
- all
- runtime; build; native; contentfiles; analyzers; buildtransitive
-
diff --git a/src/Wpf.Ui/Controls/ProgressRing/ProgressRing.cs b/src/Wpf.Ui/Controls/ProgressRing/ProgressRing.cs
index 0e4399e5c..fb259801a 100644
--- a/src/Wpf.Ui/Controls/ProgressRing/ProgressRing.cs
+++ b/src/Wpf.Ui/Controls/ProgressRing/ProgressRing.cs
@@ -103,7 +103,7 @@ public double EngAngle
public double IndeterminateAngle
{
get => (double)GetValue(IndeterminateAngleProperty);
- internal set => SetValue(IndeterminateAngleProperty, value);
+ set => SetValue(IndeterminateAngleProperty, value);
}
///
@@ -112,7 +112,7 @@ public double IndeterminateAngle
public Brush CoverRingStroke
{
get => (Brush)GetValue(CoverRingStrokeProperty);
- internal set => SetValue(CoverRingStrokeProperty, value);
+ set => SetValue(CoverRingStrokeProperty, value);
}
///
@@ -121,7 +121,7 @@ public Brush CoverRingStroke
public System.Windows.Visibility CoverRingVisibility
{
get => (System.Windows.Visibility)GetValue(CoverRingVisibilityProperty);
- internal set => SetValue(CoverRingVisibilityProperty, value);
+ set => SetValue(CoverRingVisibilityProperty, value);
}
///
diff --git a/src/Wpf.Ui/Controls/Window/WindowBackdrop.cs b/src/Wpf.Ui/Controls/Window/WindowBackdrop.cs
index b23d0647f..9eb42f385 100644
--- a/src/Wpf.Ui/Controls/Window/WindowBackdrop.cs
+++ b/src/Wpf.Ui/Controls/Window/WindowBackdrop.cs
@@ -61,8 +61,7 @@ public static bool ApplyBackdrop(Window? window, WindowBackdropType backdropType
window.Loaded += (sender, _1) =>
{
- IntPtr windowHandle =
- new WindowInteropHelper(sender as Window)?.Handle ?? IntPtr.Zero;
+ IntPtr windowHandle = new WindowInteropHelper(sender as Window)?.Handle ?? IntPtr.Zero;
if (windowHandle == IntPtr.Zero)
{
@@ -118,9 +117,18 @@ public static bool ApplyBackdrop(IntPtr hWnd, WindowBackdropType backdropType)
return backdropType switch
{
WindowBackdropType.Auto => ApplyDwmwWindowAttribute(hWnd, DWM_SYSTEMBACKDROP_TYPE.DWMSBT_AUTO),
- WindowBackdropType.Mica => ApplyDwmwWindowAttribute(hWnd, DWM_SYSTEMBACKDROP_TYPE.DWMSBT_MAINWINDOW),
- WindowBackdropType.Acrylic => ApplyDwmwWindowAttribute(hWnd, DWM_SYSTEMBACKDROP_TYPE.DWMSBT_TRANSIENTWINDOW),
- WindowBackdropType.Tabbed => ApplyDwmwWindowAttribute(hWnd, DWM_SYSTEMBACKDROP_TYPE.DWMSBT_TABBEDWINDOW),
+ WindowBackdropType.Mica => ApplyDwmwWindowAttribute(
+ hWnd,
+ DWM_SYSTEMBACKDROP_TYPE.DWMSBT_MAINWINDOW
+ ),
+ WindowBackdropType.Acrylic => ApplyDwmwWindowAttribute(
+ hWnd,
+ DWM_SYSTEMBACKDROP_TYPE.DWMSBT_TRANSIENTWINDOW
+ ),
+ WindowBackdropType.Tabbed => ApplyDwmwWindowAttribute(
+ hWnd,
+ DWM_SYSTEMBACKDROP_TYPE.DWMSBT_TABBEDWINDOW
+ ),
_ => ApplyDwmwWindowAttribute(hWnd, DWM_SYSTEMBACKDROP_TYPE.DWMSBT_NONE),
};
}
@@ -170,7 +178,7 @@ public static unsafe bool RemoveBackdrop(IntPtr hWnd)
new HWND(hWnd),
DWMWINDOWATTRIBUTE.DWMWA_MICA_EFFECT,
&pvAttribute,
- (uint) sizeof(BOOL)
+ (uint)sizeof(BOOL)
);
DWM_SYSTEMBACKDROP_TYPE backdropPvAttribute = DWM_SYSTEMBACKDROP_TYPE.DWMSBT_NONE;
@@ -241,11 +249,12 @@ public static unsafe bool RemoveTitlebarBackground(Window? window)
// Specifying DWMWA_COLOR_DEFAULT (value 0xFFFFFFFF) for the color will reset the window back to using the system's default behavior for the caption color.
uint titlebarPvAttribute = PInvoke.DWMWA_COLOR_NONE;
- return PInvoke.DwmSetWindowAttribute(new HWND(windowSource.Handle),
- DWMWINDOWATTRIBUTE.DWMWA_CAPTION_COLOR,
- &titlebarPvAttribute,
- sizeof(uint)) ==
- HRESULT.S_OK;
+ return PInvoke.DwmSetWindowAttribute(
+ new HWND(windowSource.Handle),
+ DWMWINDOWATTRIBUTE.DWMWA_CAPTION_COLOR,
+ &titlebarPvAttribute,
+ sizeof(uint)
+ ) == HRESULT.S_OK;
}
return true;
@@ -265,22 +274,24 @@ private static unsafe bool ApplyDwmwWindowAttribute(IntPtr hWnd, DWM_SYSTEMBACKD
DWM_SYSTEMBACKDROP_TYPE backdropPvAttribute = dwmSbt;
- return PInvoke.DwmSetWindowAttribute(new HWND(hWnd),
- DWMWINDOWATTRIBUTE.DWMWA_SYSTEMBACKDROP_TYPE,
- &backdropPvAttribute,
- sizeof(DWM_SYSTEMBACKDROP_TYPE)) ==
- HRESULT.S_OK;
+ return PInvoke.DwmSetWindowAttribute(
+ new HWND(hWnd),
+ DWMWINDOWATTRIBUTE.DWMWA_SYSTEMBACKDROP_TYPE,
+ &backdropPvAttribute,
+ sizeof(DWM_SYSTEMBACKDROP_TYPE)
+ ) == HRESULT.S_OK;
}
private static unsafe bool ApplyLegacyMicaBackdrop(IntPtr hWnd)
{
BOOL backdropPvAttribute = true;
- return PInvoke.DwmSetWindowAttribute(new HWND(hWnd),
- DWMWINDOWATTRIBUTE.DWMWA_MICA_EFFECT,
- &backdropPvAttribute,
- (uint)sizeof(BOOL)) ==
- HRESULT.S_OK;
+ return PInvoke.DwmSetWindowAttribute(
+ new HWND(hWnd),
+ DWMWINDOWATTRIBUTE.DWMWA_MICA_EFFECT,
+ &backdropPvAttribute,
+ (uint)sizeof(BOOL)
+ ) == HRESULT.S_OK;
}
private static bool RestoreContentBackground(IntPtr hWnd)
diff --git a/src/Wpf.Ui/Extensions/PInvokeExtensions.cs b/src/Wpf.Ui/Extensions/PInvokeExtensions.cs
index 4b83eb118..aec029fe5 100644
--- a/src/Wpf.Ui/Extensions/PInvokeExtensions.cs
+++ b/src/Wpf.Ui/Extensions/PInvokeExtensions.cs
@@ -19,6 +19,7 @@ internal static class PInvokeExtensions
///
/// Gets the window attribute used to enable immersive dark mode prior to Windows 11.
///
- public static DWMWINDOWATTRIBUTE DMWA_USE_IMMERSIVE_DARK_MODE_OLD => DWMWINDOWATTRIBUTE.DWMWA_USE_IMMERSIVE_DARK_MODE - 1;
+ public static DWMWINDOWATTRIBUTE DMWA_USE_IMMERSIVE_DARK_MODE_OLD =>
+ DWMWINDOWATTRIBUTE.DWMWA_USE_IMMERSIVE_DARK_MODE - 1;
}
-}
\ No newline at end of file
+}
diff --git a/src/Wpf.Ui/Interop/PInvoke.cs b/src/Wpf.Ui/Interop/PInvoke.cs
index 5f7fd94a1..1d4c052c5 100644
--- a/src/Wpf.Ui/Interop/PInvoke.cs
+++ b/src/Wpf.Ui/Interop/PInvoke.cs
@@ -11,6 +11,9 @@ namespace Windows.Win32;
internal static partial class PInvoke
{
- [DllImport("USER32.dll", ExactSpelling = true, EntryPoint = "SetWindowLongPtrW", SetLastError = true), DefaultDllImportSearchPaths(DllImportSearchPath.System32)]
+ [
+ DllImport("USER32.dll", ExactSpelling = true, EntryPoint = "SetWindowLongPtrW", SetLastError = true),
+ DefaultDllImportSearchPaths(DllImportSearchPath.System32)
+ ]
internal static extern nint SetWindowLongPtr(HWND hWnd, WINDOW_LONG_PTR_INDEX nIndex, nint dwNewLong);
-}
\ No newline at end of file
+}
diff --git a/src/Wpf.Ui/Interop/UnsafeNativeMethods.cs b/src/Wpf.Ui/Interop/UnsafeNativeMethods.cs
index d2ec25a89..067e3ef5b 100644
--- a/src/Wpf.Ui/Interop/UnsafeNativeMethods.cs
+++ b/src/Wpf.Ui/Interop/UnsafeNativeMethods.cs
@@ -7,13 +7,13 @@
and is intended for use on Windows systems only.
This Source Code is partially based on the source code provided by the .NET Foundation. */
+using Microsoft.Win32;
using Windows.Win32;
using Windows.Win32.Foundation;
using Windows.Win32.Graphics.Dwm;
using Windows.Win32.UI.Controls;
using Windows.Win32.UI.Shell;
using Windows.Win32.UI.WindowsAndMessaging;
-using Microsoft.Win32;
using Wpf.Ui.Controls;
namespace Wpf.Ui.Interop;
@@ -29,7 +29,10 @@ internal static class UnsafeNativeMethods
/// Selected window handle.
/// Window corner preference.
/// if invocation of native Windows function succeeds.
- public static unsafe bool ApplyWindowCornerPreference(IntPtr handle, WindowCornerPreference cornerPreference)
+ public static unsafe bool ApplyWindowCornerPreference(
+ IntPtr handle,
+ WindowCornerPreference cornerPreference
+ )
{
if (handle == IntPtr.Zero)
{
@@ -162,11 +165,8 @@ public static unsafe bool RemoveWindowDarkMode(IntPtr handle)
dwAttribute = DWMWINDOWATTRIBUTE.DMWA_USE_IMMERSIVE_DARK_MODE_OLD;
}
- return PInvoke.DwmSetWindowAttribute(new HWND(handle),
- dwAttribute,
- &pvAttribute,
- (uint)sizeof(BOOL)) ==
- HRESULT.S_OK;
+ return PInvoke.DwmSetWindowAttribute(new HWND(handle), dwAttribute, &pvAttribute, (uint)sizeof(BOOL))
+ == HRESULT.S_OK;
}
///
@@ -202,7 +202,8 @@ public static unsafe bool ApplyWindowDarkMode(IntPtr handle)
dwAttribute = DWMWINDOWATTRIBUTE.DMWA_USE_IMMERSIVE_DARK_MODE_OLD;
}
- return PInvoke.DwmSetWindowAttribute(new HWND(handle), dwAttribute, &pvAttribute, (uint)sizeof(BOOL)) == HRESULT.S_OK;
+ return PInvoke.DwmSetWindowAttribute(new HWND(handle), dwAttribute, &pvAttribute, (uint)sizeof(BOOL))
+ == HRESULT.S_OK;
}
///
@@ -368,13 +369,19 @@ public static unsafe bool RemoveWindowCaption(IntPtr hWnd)
var wtaOptions = new WTA_OPTIONS()
{
dwFlags = PInvoke.WTNCA_NODRAWCAPTION,
- dwMask = PInvoke.WTNCA_NODRAWCAPTION | PInvoke.WTNCA_NODRAWICON | PInvoke.WTNCA_NOMIRRORHELP | PInvoke.WTNCA_NOSYSMENU,
+ dwMask =
+ PInvoke.WTNCA_NODRAWCAPTION
+ | PInvoke.WTNCA_NODRAWICON
+ | PInvoke.WTNCA_NOMIRRORHELP
+ | PInvoke.WTNCA_NOSYSMENU,
};
- return PInvoke.SetWindowThemeAttribute(new HWND(hWnd),
- WINDOWTHEMEATTRIBUTETYPE.WTA_NONCLIENT,
- &wtaOptions,
- (uint)sizeof(WTA_OPTIONS)) == HRESULT.S_OK;
+ return PInvoke.SetWindowThemeAttribute(
+ new HWND(hWnd),
+ WINDOWTHEMEATTRIBUTETYPE.WTA_NONCLIENT,
+ &wtaOptions,
+ (uint)sizeof(WTA_OPTIONS)
+ ) == HRESULT.S_OK;
}
///
@@ -405,8 +412,8 @@ private static bool GetHandle(Window? window, out IntPtr windowHandle)
private static IntPtr SetWindowLong(IntPtr handle, WINDOW_LONG_PTR_INDEX nIndex, long windowStyleLong)
{
- return IntPtr.Size == 4
- ? new IntPtr(PInvoke.SetWindowLong(new HWND(handle), nIndex, (int)windowStyleLong))
+ return IntPtr.Size == 4
+ ? new IntPtr(PInvoke.SetWindowLong(new HWND(handle), nIndex, (int)windowStyleLong))
: PInvoke.SetWindowLongPtr(new HWND(handle), nIndex, (nint)windowStyleLong);
}
}
diff --git a/src/Wpf.Ui/Interop/UnsafeReflection.cs b/src/Wpf.Ui/Interop/UnsafeReflection.cs
index 2d4ed93bb..068f2f7ad 100644
--- a/src/Wpf.Ui/Interop/UnsafeReflection.cs
+++ b/src/Wpf.Ui/Interop/UnsafeReflection.cs
@@ -47,4 +47,4 @@ public static TBPFLAG Cast(TaskBarProgressState taskBarProgressState)
_ => TBPFLAG.TBPF_NOPROGRESS,
};
}
-}
\ No newline at end of file
+}
diff --git a/src/Wpf.Ui/Wpf.Ui.csproj b/src/Wpf.Ui/Wpf.Ui.csproj
index 4ce991915..1b322d324 100644
--- a/src/Wpf.Ui/Wpf.Ui.csproj
+++ b/src/Wpf.Ui/Wpf.Ui.csproj
@@ -2,7 +2,7 @@
WPF-UI
- net462;net472;net481;net6.0-windows;net8.0-windows;net9.0-windows
+ net10.0-windows;net9.0-windows;net8.0-windows;net481;net472;net462
true
WPF UI provides the Fluent experience in your known and loved WPF framework. Intuitive design, themes, navigation and new immersive controls. All natively and effortlessly.
true
@@ -58,19 +58,11 @@
all
runtime; build; native; contentfiles; analyzers; buildtransitive
-
- all
- build; analyzers
-
all
runtime; build; native; contentfiles; analyzers; buildtransitive
-
- all
- runtime; build; native; contentfiles; analyzers; buildtransitive
-
diff --git a/tests/Wpf.Ui.Gallery.IntegrationTests/Wpf.Ui.Gallery.IntegrationTests.csproj b/tests/Wpf.Ui.Gallery.IntegrationTests/Wpf.Ui.Gallery.IntegrationTests.csproj
index 01e1e6d69..7956d330c 100644
--- a/tests/Wpf.Ui.Gallery.IntegrationTests/Wpf.Ui.Gallery.IntegrationTests.csproj
+++ b/tests/Wpf.Ui.Gallery.IntegrationTests/Wpf.Ui.Gallery.IntegrationTests.csproj
@@ -1,7 +1,7 @@

- net9.0-windows10.0.26100.0
+ net10.0-windows10.0.26100.0
enable
Exe