Class UnsafeNativeMethods
A set of dangerous methods to modify the appearance.
public static class UnsafeNativeMethods
- Inheritance
-
UnsafeNativeMethods
- Inherited Members
Methods
ApplyBorderColor(IntPtr, int)
Tries to apply the color of the border.
public static bool ApplyBorderColor(IntPtr handle, int color)
Parameters
Returns
ApplyBorderColor(IntPtr, Color)
Tries to apply the color of the border.
public static bool ApplyBorderColor(IntPtr handle, Color color)
Parameters
Returns
ApplyBorderColor(Window, int)
Tries to apply the color of the border.
public static bool ApplyBorderColor(Window window, int color)
Parameters
Returns
ApplyBorderColor(Window, Color)
Tries to apply the color of the border.
public static bool ApplyBorderColor(Window window, Color color)
Parameters
Returns
ApplyWindowBackdrop(IntPtr, WindowBackdropType)
Tries to apply selected backdrop type for window handle.
public static bool ApplyWindowBackdrop(IntPtr handle, WindowBackdropType backgroundType)
Parameters
handleIntPtrSelected window handle.
backgroundTypeWindowBackdropTypeBackdrop type.
Returns
ApplyWindowCornerPreference(IntPtr, WindowCornerPreference)
Tries to set the corner preference of the selected window.
public static bool ApplyWindowCornerPreference(IntPtr handle, WindowCornerPreference cornerPreference)
Parameters
handleIntPtrSelected window handle.
cornerPreferenceWindowCornerPreferenceWindow corner preference.
Returns
ApplyWindowCornerPreference(Window, WindowCornerPreference)
Tries to set the Window corner preference.
public static bool ApplyWindowCornerPreference(Window window, WindowCornerPreference cornerPreference)
Parameters
windowWindowSelected window.
cornerPreferenceWindowCornerPreferenceWindow corner preference.
Returns
ApplyWindowDarkMode(IntPtr)
Tries to apply ImmersiveDarkMode effect for the window handle.
public static bool ApplyWindowDarkMode(IntPtr handle)
Parameters
handleIntPtrWindow handle.
Returns
ApplyWindowDarkMode(Window?)
Tries to apply ImmersiveDarkMode effect for the Window.
public static bool ApplyWindowDarkMode(Window? window)
Parameters
windowWindowThe 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
handleIntPtrWindow handle
Returns
ApplyWindowLegacyAcrylicEffect(Window?)
Tries to apply legacy Acrylic effect for the selected Window.
public static bool ApplyWindowLegacyAcrylicEffect(Window? window)
Parameters
windowWindowThe 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
handleIntPtrWindow handle.
Returns
ApplyWindowLegacyMicaEffect(Window?)
Tries to apply legacy Mica effect for the selected Window.
public static bool ApplyWindowLegacyMicaEffect(Window? window)
Parameters
windowWindowThe window to which the effect is to be applied.
Returns
ExtendClientAreaIntoTitleBar(IntPtr)
public static bool ExtendClientAreaIntoTitleBar(IntPtr hWnd)
Parameters
hWndIntPtr
Returns
ExtendClientAreaIntoTitleBar(Window)
public static bool ExtendClientAreaIntoTitleBar(Window window)
Parameters
windowWindow
Returns
GetAccentColor()
Tries to get currently selected Window accent color.
public static Color GetAccentColor()
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
hWndIntPtr
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
handleIntPtrWindow handle.
backdropTypeWindowBackdropTypeBackground backdrop type.
Returns
IsWindowHasLegacyMica(IntPtr)
Tries to determine whether the provided handle has applied legacy Mica effect.
public static bool IsWindowHasLegacyMica(IntPtr handle)
Parameters
handleIntPtrWindow handle.
Returns
IsWindowHasLegacyMica(Window?)
Tries to determine whether the provided Window has applied legacy Mica effect.
public static bool IsWindowHasLegacyMica(Window? window)
Parameters
windowWindowWindow to check.
Returns
RemoveWindowCaption(IntPtr)
public static bool RemoveWindowCaption(IntPtr hWnd)
Parameters
hWndIntPtr
Returns
RemoveWindowCaption(Window)
public static bool RemoveWindowCaption(Window window)
Parameters
windowWindow
Returns
RemoveWindowDarkMode(IntPtr)
Tries to remove ImmersiveDarkMode effect from the window handle.
public static bool RemoveWindowDarkMode(IntPtr handle)
Parameters
handleIntPtrWindow handle.
Returns
RemoveWindowDarkMode(Window?)
Tries to remove ImmersiveDarkMode effect from the Window.
public static bool RemoveWindowDarkMode(Window? window)
Parameters
windowWindowThe 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
handleIntPtrWindow handle.
Returns
RemoveWindowTitlebarContents(Window?)
Tries to remove titlebar from selected Window.
public static bool RemoveWindowTitlebarContents(Window? window)
Parameters
windowWindowThe window to which the effect is to be applied.