Class UnsafeNativeMethods
A set of dangerous methods to modify the appearance.
public static class UnsafeNativeMethods
- Inheritance
-
UnsafeNativeMethods
- Inherited Members
Methods
ApplyWindowBackdrop(IntPtr, WindowBackdropType)
Tries to apply selected backdrop type for window handle.
public static bool ApplyWindowBackdrop(IntPtr handle, WindowBackdropType backgroundType)
Parameters
handle
IntPtrSelected window handle.
backgroundType
WindowBackdropTypeBackdrop type.
Returns
ApplyWindowCornerPreference(IntPtr, WindowCornerPreference)
Tries to set the corner preference of the selected window.
public static bool ApplyWindowCornerPreference(IntPtr handle, WindowCornerPreference cornerPreference)
Parameters
handle
IntPtrSelected window handle.
cornerPreference
WindowCornerPreferenceWindow corner preference.
Returns
ApplyWindowCornerPreference(Window, WindowCornerPreference)
Tries to set the Window corner preference.
public static bool ApplyWindowCornerPreference(Window window, WindowCornerPreference cornerPreference)
Parameters
window
WindowSelected window.
cornerPreference
WindowCornerPreferenceWindow corner preference.
Returns
ApplyWindowDarkMode(IntPtr)
Tries to apply ImmersiveDarkMode effect for the window handle.
public static bool ApplyWindowDarkMode(IntPtr handle)
Parameters
handle
IntPtrWindow handle.
Returns
ApplyWindowDarkMode(Window?)
Tries to apply ImmersiveDarkMode effect for the Window.
public static bool ApplyWindowDarkMode(Window? window)
Parameters
window
WindowThe window to which the effect is to be applied.
Returns
ApplyWindowLegacyAcrylicEffect(IntPtr)
Tries to apply legacy Acrylic effect for the selected Window.
public static bool ApplyWindowLegacyAcrylicEffect(IntPtr handle)
Parameters
handle
IntPtrWindow handle
Returns
ApplyWindowLegacyAcrylicEffect(Window?)
Tries to apply legacy Acrylic effect for the selected Window.
public static bool ApplyWindowLegacyAcrylicEffect(Window? window)
Parameters
window
WindowThe window to which the effect is to be applied.
Returns
ApplyWindowLegacyMicaEffect(IntPtr)
Tries to apply legacy Mica effect for the selected Window.
public static bool ApplyWindowLegacyMicaEffect(IntPtr handle)
Parameters
handle
IntPtrWindow handle.
Returns
ApplyWindowLegacyMicaEffect(Window?)
Tries to apply legacy Mica effect for the selected Window.
public static bool ApplyWindowLegacyMicaEffect(Window? window)
Parameters
window
WindowThe window to which the effect is to be applied.
Returns
ExtendClientAreaIntoTitleBar(IntPtr)
public static bool ExtendClientAreaIntoTitleBar(IntPtr hWnd)
Parameters
hWnd
IntPtr
Returns
ExtendClientAreaIntoTitleBar(Window)
public static bool ExtendClientAreaIntoTitleBar(Window window)
Parameters
window
Window
Returns
GetDwmColor()
Tries to get currently selected Window accent color.
public static Color GetDwmColor()
Returns
IsCompositionEnabled()
Checks whether the DWM composition is enabled.
public static bool IsCompositionEnabled()
Returns
IsValidWindow(IntPtr)
Checks if provided pointer represents existing window.
public static bool IsValidWindow(IntPtr hWnd)
Parameters
hWnd
IntPtr
Returns
IsWindowHasBackdrop(IntPtr, WindowBackdropType)
Tries to determine whether the provided Window has applied legacy backdrop effect.
public static bool IsWindowHasBackdrop(IntPtr handle, WindowBackdropType backdropType)
Parameters
handle
IntPtrWindow handle.
backdropType
WindowBackdropTypeBackground backdrop type.
Returns
IsWindowHasLegacyMica(IntPtr)
Tries to determine whether the provided handle has applied legacy Mica effect.
public static bool IsWindowHasLegacyMica(IntPtr handle)
Parameters
handle
IntPtrWindow handle.
Returns
IsWindowHasLegacyMica(Window?)
Tries to determine whether the provided Window has applied legacy Mica effect.
public static bool IsWindowHasLegacyMica(Window? window)
Parameters
window
WindowWindow to check.
Returns
RemoveWindowCaption(IntPtr)
public static bool RemoveWindowCaption(IntPtr hWnd)
Parameters
hWnd
IntPtr
Returns
RemoveWindowCaption(Window)
public static bool RemoveWindowCaption(Window window)
Parameters
window
Window
Returns
RemoveWindowDarkMode(IntPtr)
Tries to remove ImmersiveDarkMode effect from the window handle.
public static bool RemoveWindowDarkMode(IntPtr handle)
Parameters
handle
IntPtrWindow handle.
Returns
RemoveWindowDarkMode(Window?)
Tries to remove ImmersiveDarkMode effect from the Window.
public static bool RemoveWindowDarkMode(Window? window)
Parameters
window
WindowThe window to which the effect is to be applied.
Returns
RemoveWindowTitlebarContents(IntPtr)
Tries to remove titlebar from selected window handle.
public static bool RemoveWindowTitlebarContents(IntPtr handle)
Parameters
handle
IntPtrWindow handle.
Returns
RemoveWindowTitlebarContents(Window?)
Tries to remove titlebar from selected Window.
public static bool RemoveWindowTitlebarContents(Window? window)
Parameters
window
WindowThe window to which the effect is to be applied.