ControlzEx
Automation-Peer for .
Initializes a new instance.
Automation-Peer for in .
Initializes a new instance.
Gets the real tab item.
Identifies the dependency property.
Gets or sets the Badge content to display.
Identifies the dependency property.
The BadgeFontFamily property specifies the name of font family.
Identifies the dependency property.
The BadgeFontStyle property requests normal, italic, and oblique faces within a font family.
Identifies the dependency property.
The BadgeFontWeight property specifies the weight of the font.
Identifies the dependency property.
The BadgeFontStretch property selects a normal, condensed, or extended face from a font family.
Identifies the dependency property.
The BadgeFontSize property specifies the size of the font.
Identifies the dependency property.
Gets or sets the background brush for the Badge.
Identifies the dependency property.
Gets or sets the foreground brush for the Badge.
Identifies the dependency property.
Gets or sets the border brush for the Badge.
Identifies the dependency property.
Gets or sets the border thickness for the Badge.
Identifies the dependency property.
Gets or sets the placement of the Badge relative to its content.
Identifies the dependency property.
Gets or sets a margin which can be used to make minor adjustments to the placement of the Badge.
Identifies the dependency property.
Gets or sets the for the Badge
Identifies the dependency property.
Gets or sets the for the Badge
Identifies the dependency property.
Gets or sets a composite string that specifies how to format the Badge property if it is displayed as a string.
This property is ignored if is set.
Identifies the dependency property.
Indicates whether the Badge has content to display.
for .
Gets or sets a brush which is used as the glow when the window is active.
for .
Gets or sets a brush which is used as the glow when the window is not active.
for .
Defines whether glow transitions should be used or not.
for .
Gets or sets resize border thickness.
Updates all glow windows (visible, hidden, collapsed)
Sets the opacity to all glow windows
Starts the opacity storyboard 0 -> 1
Shows all glow windows
Closes all glow windows
Enables an InputMask for with 2 Properties: , .
Identifies the dependency property.
Identifies the dependency property.
Identifies the dependency property.
Identifies the dependency property.
Pasting prüft ob korrekte Daten reingepastet werden
Falls eine Textauswahl vorliegt wird diese entsprechend behandelt.
With this class we can make custom window styles.
Underlying HWND for the _window.
Critical : Critical member
Underlying HWND for the _window.
Critical : Critical member provides access to HWND's window messages which are critical
Mirror property for .
for .
Defines if the Taskbar should be ignored when maximizing a Window.
This only works with WindowStyle = None.
for .
Gets/sets if the border thickness value should be kept on maximize
if the MaxHeight/MaxWidth of the window is less than the monitor resolution.
for .
Gets or sets whether the resizing of the window should be tried in a way that does not cause flicker/jitter, especially when resizing from the left side.
Please note that setting this to true may cause resize lag and black areas appearing on some systems.
for .
for .
Gets whether the non-client area is active or not.
Gets or sets whether if the minimize button is visible and the minimize system menu is enabled.
Gets or sets whether if the maximize/restore button is visible and the maximize/restore system menu is enabled.
Gets the default resize border thicknes from the system parameters.
Occurs during the cleanup of this behavior.
Is called when the associated object of this instance is loaded
This fix is needed because style triggers don't work if someone sets the value locally/directly on the window.
Create a new instance.
Critical : Store critical methods in critical callback table
Safe : Demands full trust permissions
Critical : Calls critical methods
Safe : Demands full trust permissions
Critical : Calls critical methods
Critical : Accesses critical _hwnd
Critical : Calls critical methods
Critical : Calls critical methods
Critical : Calls critical methods
This method handles the window size if the taskbar is set to auto-hide.
Critical : Calls critical methods
Critical : Calls critical methods
Critical : Calls critical methods
Critical : Calls critical method
Critical : Calls critical method
Critical : Calls critical Marshal.PtrToStructure
Critical : Calls critical Marshal.PtrToStructure
Critical : Calls critical methods
Critical : Calls critical methods
Critical : Calls critical methods
Critical : Calls critical methods
Critical : Calls critical methods
Critical : Calls critical methods
Add and remove a native WindowStyle from the HWND.
The styles to be removed. These can be bitwise combined.
The styles to be added. These can be bitwise combined.
Whether the styles of the HWND were modified as a result of this call.
Critical : Calls critical methods
Get the WindowState as the native HWND knows it to be. This isn't necessarily the same as what Window thinks.
Critical : Calls critical methods
Get the bounding rectangle for the window in physical coordinates.
The bounding rectangle for the window.
Critical : Calls critical methods
Update the items in the system menu based on the current, or assumed, WindowState.
The state to assume that the Window is in. This can be null to query the Window's state.
We want to update the menu while we have some control over whether the caption will be repainted.
Critical : Calls critical methods
Critical : Calls critical methods
Critical : Calls critical methods
Critical : Calls critical methods
Critical : Calls critical methods
Critical : Calls critical methods
Matrix of the HT values to return when responding to NC window messages.
Critical : Calls critical methods
Critical : Calls critical methods
GlowWindow
InitializeComponent
The standard WPF TabControl is quite bad in the fact that it only
even contains the current TabItem in the VisualTree, so if you
have complex views it takes a while to re-create the view each tab
selection change.Which makes the standard TabControl very sticky to
work with. This class along with its associated ControlTemplate
allow all TabItems to remain in the VisualTree without it being Sticky.
It does this by keeping all TabItem content in the VisualTree but
hides all inactive TabItem content, and only keeps the active TabItem
content shown.
Acknowledgement
Eric Burke
http://eric.burke.name/dotnetmania/2009/04/26/22.09.28
Sacha Barber: https://sachabarbs.wordpress.com/about-me/
http://stackoverflow.com/a/10210889/920384
http://stackoverflow.com/a/7838955/920384
We use two attached properties to later recognize the content presenters we generated.
We need the OwningItem because the TabItem associated with an item can later change.
We need the OwningTabItem to reduce the amount of lookups we have to do.
Identifies the dependency property.
Identifies the dependency property.
Helper for getting from .
to read from.
OwningTabItem property value.
Helper for setting on .
to set on.
OwningTabItem property value.
Helper for setting on .
to set on.
OwningItem property value.
Helper for getting from .
to read from.
OwningItem property value.
Identifies the dependency property.
Gets or sets whether keyboard focus should be moved to the content area when the selected item changes.
Initializes a new instance.
Defines if the TabPanel (Tab-Header) are visible.
Gets or sets the child content visibility.
The child content visibility.
When the items change we remove any generated panel children and add any new ones as necessary.
Copied from . wish it were protected in that class instead of private.
Clears all current children by calling and calls afterwards.
Generate a ContentPresenter for the selected item and control the visibility of already created presenters.
Create the child ContentPresenter for the given item (could be data or a TabItem) if none exists.
Find the for the given object. Data could be a TabItem or a piece of data.
Gets the value associated with directly from .
Checks if directly contains .
Helper class for a common focusing problem.
The focus itself isn't the problem. If we use the common focusing methods the control get the focus
but it doesn't get the focus visual style.
The KeyboardNavigation class handles the visual style only if the control get the focus from a keyboard
device or if the SystemParameters.KeyboardCues is true.
Gets the KeyboardNavigationEx singleton instance.
Shows the focus visual of the current focused UI element.
Works only together with AlwaysShowFocusVisual property.
Focuses the specified element and shows the focus visual style.
The element which will be focused.
Attached DependencyProperty for setting AlwaysShowFocusVisual for a UI element.
Gets a the value which indicates if the UI element always show the focus visual style.
Sets a the value which indicates if the UI element always show the focus visual style.
IID_IApplicationAssociationRegistration
IID_IConnectionPoint
IID_IConnectionPointContainer
IID_IEnumConnectionPoints
IID_IEnumConnections
IID_IEnumIDList
IID_IEnumObjects
IID_IFileDialog
IID_IFileDialogEvents
IID_IFileOpenDialog
IID_IFileSaveDialog
IID_IHTMLDocument
IID_IHTMLDocument2
IID_IModalWindow
IID_IObjectArray
IID_IObjectCollection
IID_IPropertyNotifySink
IID_IPropertyStore
IID_IServiceProvider
IID_IShellFolder
IID_IShellLink
IID_IShellItem
IID_IShellItem2
IID_IShellItemArray
IID_ITaskbarList
IID_ITaskbarList2
IID_IUnknown
IID_IWebBrowser2
DIID_DWebBrowserEvents
IID_DWebBrowserEvents2
IID_IWICBitmapDecoder
IID_IWICBitmapFlipRotator
IID_IWICBitmapFrameDecode
IID_IWICBitmap
IID_IWICBitmapSource
IID_IWICFormatConverter
IID_IWICImagingFactory
IID_IWICStream
IID_IApplicationDestinations
IID_IApplicationDocumentLists
IID_ICustomDestinationList
IID_IObjectWithAppUserModelID
IID_IObjectWithProgID
IID_ITaskbarList3
IID_ITaskbarList4
A static class for verifying assumptions.
A function signature for Assert.Evaluate.
A function signature for Assert.Implies.
Returns the truth of a predicate.
Executes the specified argument.
The function to execute.
Obsolete: Use Standard.Assert.AreEqual instead of Assert.Equals
The generic type to compare for equality.
The first generic type data to compare. This is is the expected value.
The second generic type data to compare. This is the actual value.
Verifies that two generic type data are equal. The assertion fails if they are not.
The generic type to compare for equality.
The first generic type data to compare. This is is the expected value.
The second generic type data to compare. This is the actual value.
This breaks into the debugger in the case of a failed assertion.
Verifies that two generic type data are not equal. The assertion fails if they are.
The generic type to compare for inequality.
The first generic type data to compare. This is is the value that's not expected.
The second generic type data to compare. This is the actual value.
This breaks into the debugger in the case of a failed assertion.
Verifies that if the specified condition is true, then so is the result.
The assertion fails if the condition is true but the result is false.
if set to true [condition].
A second Boolean statement. If the first was true then so must this be.
If the first statement was false then the value of this is ignored.
This breaks into the debugger in the case of a failed assertion.
Lazy evaluation overload. Verifies that if a condition is true, then so is a secondary value.
The conditional value.
A function to be evaluated for truth if the condition argument is true.
This overload only evaluates the result if the first condition is true.
Verifies that a string has content. I.e. it is not null and it is not empty.
The string to verify.
Verifies that a string has content. I.e. it is not null and it is not purely whitespace.
The string to verify.
Verifies the specified value is not null. The assertion fails if it is.
The generic reference type.
The value to check for nullness.
This breaks into the debugger in the case of a failed assertion.
Verifies that the specified condition is false. The assertion fails if it is true.
The expression that should be false.
This breaks into the debugger in the case of a failed assertion.
Verifies that the specified condition is false. The assertion fails if it is true.
The expression that should be false.
The message to display if the condition is true.
This breaks into the debugger in the case of a failed assertion.
Verifies that the specified condition is true. The assertion fails if it is not.
A condition that is expected to be true.
This breaks into the debugger in the case of a failed assertion.
Verifies that the specified condition is true. The assertion fails if it is not.
A condition that is expected to be true.
The message to write in case the condition is false.
This breaks into the debugger in the case of a failed assertion.
This line should never be executed. The assertion always fails.
This breaks into the debugger in the case of a failed assertion.
This line should never be executed. The assertion always fails.
The message to display if this function is executed.
This breaks into the debugger in the case of a failed assertion.
Verifies that the specified object is null. The assertion fails if it is not.
The item to verify is null.
Verifies that the specified value is within the expected range. The assertion fails if it isn't.
The lower bound inclusive value.
The value to verify.
The upper bound inclusive value.
Verifies that the specified value is within the expected range. The assertion fails if it isn't.
The lower bound inclusive value.
The value to verify.
The upper bound exclusive value.
Verify the current thread's apartment state is what's expected. The assertion fails if it isn't
The expected apartment state for the current thread.
This breaks into the debugger in the case of a failed assertion.
DoubleUtil uses fixed eps to provide fuzzy comparison functionality for doubles.
Note that FP noise is a big problem and using any of these compare
methods is not a complete solution, but rather the way to reduce
the probability of repeating unnecessary work.
Epsilon - more or less random, more or less small number.
AreClose returns whether or not two doubles are "close". That is, whether or
not they are within epsilon of each other.
There are plenty of ways for this to return false even for numbers which
are theoretically identical, so no code calling this should fail to work if this
returns false.
The first double to compare.
The second double to compare.
The result of the AreClose comparision.
LessThan returns whether or not the first double is less than the second double.
That is, whether or not the first is strictly less than *and* not within epsilon of
the other number.
There are plenty of ways for this to return false even for numbers which
are theoretically identical, so no code calling this should fail to work if this
returns false.
The first double to compare.
The second double to compare.
The result of the LessThan comparision.
GreaterThan returns whether or not the first double is greater than the second double.
That is, whether or not the first is strictly greater than *and* not within epsilon of
the other number.
There are plenty of ways for this to return false even for numbers which
are theoretically identical, so no code calling this should fail to work if this
returns false.
The first double to compare.
The second double to compare.
The result of the GreaterThan comparision.
LessThanOrClose returns whether or not the first double is less than or close to
the second double. That is, whether or not the first is strictly less than or within
epsilon of the other number.
There are plenty of ways for this to return false even for numbers which
are theoretically identical, so no code calling this should fail to work if this
returns false.
The first double to compare.
The second double to compare.
The result of the LessThanOrClose comparision.
GreaterThanOrClose returns whether or not the first double is greater than or close to
the second double. That is, whether or not the first is strictly greater than or within
epsilon of the other number.
There are plenty of ways for this to return false even for numbers which
are theoretically identical, so no code calling this should fail to work if this
returns false.
The first double to compare.
The second double to compare.
The result of the GreaterThanOrClose comparision.
Test to see if a double is a finite number (is not NaN or Infinity).
The value to test.
Whether or not the value is a finite number.
Test to see if a double a valid size value (is finite and > 0).
The value to test.
Whether or not the value is a valid size value.
Convert a point in device independent pixels (1/96") to a point in the system coordinates.
A point in the logical coordinate system.
Returns the parameter converted to the system's coordinates.
Convert a point in system coordinates to a point in device independent pixels (1/96").
A point in the physical coordinate system.
Returns the parameter converted to the device independent coordinate system.
Wrapper for common Win32 status codes.
The operation completed successfully.
Incorrect function.
The system cannot find the file specified.
The system cannot find the path specified.
The system cannot open the file.
Access is denied.
The handle is invalid.
Not enough storage is available to complete this operation.
There are no more files.
The process cannot access the file because it is being used by another process.
The parameter is incorrect.
The data area passed to a system call is too small.
Cannot nest calls to LoadModule.
Illegal operation attempted on a registry key that has been marked for deletion.
Element not found.
There was no match for the specified key in the index.
An invalid device was specified.
The operation was canceled by the user.
Cannot find window class.
The window class was already registered.
The specified datatype is invalid.
Create a new Win32 error.
The integer value of the error.
Performs HRESULT_FROM_WIN32 conversion.
The Win32 error being converted to an HRESULT.
The equivilent HRESULT value.
Performs HRESULT_FROM_WIN32 conversion.
The equivilent HRESULT value.
Performs the equivalent of Win32's GetLastError()
A Win32Error instance with the result of the native GetLastError
Compare two Win32 error codes for equality.
The first error code to compare.
The second error code to compare.
Whether the two error codes are the same.
Compare two Win32 error codes for inequality.
The first error code to compare.
The second error code to compare.
Whether the two error codes are not the same.
FACILITY_NULL
FACILITY_RPC
FACILITY_DISPATCH
FACILITY_STORAGE
FACILITY_ITF
FACILITY_WIN32
FACILITY_WINDOWS
FACILITY_CONTROL
MSDN doced facility code for ESE errors.
FACILITY_WINCODEC (WIC)
Wrapper for HRESULT status codes.
S_OK
S_FALSE
E_PENDING
E_NOTIMPL
E_NOINTERFACE
E_POINTER
E_ABORT
E_FAIL
E_UNEXPECTED
STG_E_INVALIDFUNCTION
REGDB_E_CLASSNOTREG
DESTS_E_NO_MATCHING_ASSOC_HANDLER. Win7 internal error code for Jump Lists.
There is no Assoc Handler for the given item registered by the specified application.
DESTS_E_NORECDOCS. Win7 internal error code for Jump Lists.
The given item is excluded from the recent docs folder by the NoRecDocs bit on its registration.
DESTS_E_NOTALLCLEARED. Win7 internal error code for Jump Lists.
Not all of the items were successfully cleared
E_ACCESSDENIED
Win32Error ERROR_ACCESS_DENIED.
E_OUTOFMEMORY
Win32Error ERROR_OUTOFMEMORY.
E_INVALIDARG
Win32Error ERROR_INVALID_PARAMETER.
INTSAFE_E_ARITHMETIC_OVERFLOW
COR_E_OBJECTDISPOSED
WC_E_GREATERTHAN
WC_E_SYNTAX
Create an HRESULT from an integer value.
Convert an HRESULT to an int. Used for COM interface declarations out of our control.
retrieve HRESULT_FACILITY
retrieve HRESULT_CODE
Get a string representation of this HRESULT.
Convert the result of Win32 GetLastError() into a raised exception.
Gets the monitor information from the current cursor position.
The monitor information.
Gets the monitor information from the current cursor position.
True when getting the monitor information was successful.
HIGHCONTRAST flags
DROPIMAGE_*
BITMAPINFOHEADER Compression type. BI_*.
CombingRgn flags. RGN_*
Creates the intersection of the two combined regions.
Creates the union of two combined regions.
Creates the union of two combined regions except for any overlapping areas.
Combines the parts of hrgnSrc1 that are not part of hrgnSrc2.
Creates a copy of the region identified by hrgnSrc1.
For IWebBrowser2. OLECMDEXECOPT_*
For IWebBrowser2. OLECMDF_*
For IWebBrowser2. OLECMDID_*
DATAOBJ_GET_ITEM_FLAGS. DOGIF_*.
Use the system default, which is to display all error dialog boxes.
The system does not display the critical-error-handler message box.
Instead, the system sends the error to the calling process.
64-bit Windows: The system automatically fixes memory alignment faults and makes them
invisible to the application. It does this for the calling process and any descendant processes.
After this value is set for a process, subsequent attempts to clear the value are ignored.
The system does not display the general-protection-fault message box.
This flag should only be set by debugging applications that handle general
protection (GP) faults themselves with an exception handler.
The system does not display a message box when it fails to find a file.
Instead, the error is returned to the calling process.
Non-client hit test values, HT*
GetClassLongPtr values, GCLP_*
https://docs.microsoft.com/en-us/windows/desktop/api/winuser/nf-winuser-getwindow
GetWindowLongPtr values, GWL_*
SystemMetrics. SM_*
SystemParameterInfo values, SPI_*
SystemParameterInfo flag values, SPIF_*
CS_*
WindowStyle values, WS_*
Window message values, WM_*
Window style extended values, WS_EX_*
GetDeviceCaps nIndex values.
Number of bits per pixel
Number of planes
Logical pixels inch in X
Logical pixels inch in Y
"FILEOP_FLAGS", FOF_*.
EnableMenuItem uEnable values, MF_*
Possible return value for EnableMenuItem
Specifies the type of visual style attribute to set on a window.
Non-client area window attributes will be set.
DWMFLIP3DWINDOWPOLICY. DWMFLIP3D_*
DWMNCRENDERINGPOLICY. DWMNCRP_*
DWMWINDOWATTRIBUTE. DWMWA_*
WindowThemeNonClientAttributes
Prevents the window caption from being drawn.
Prevents the system icon from being drawn.
Prevents the system icon menu from appearing.
Prevents mirroring of the question mark, even in right-to-left (RTL) layout.
A mask that contains all the valid bits.
SetWindowPos options
If the calling thread and the thread that owns the window are attached to different input queues, the system posts the request to the thread that owns the window. This prevents the calling thread from blocking its execution while other threads process the request.
Prevents generation of the WM_SYNCPAINT message.
Draws a frame (defined in the window's class description) around the window.
Applies new frame styles set using the SetWindowLong function. Sends a WM_NCCALCSIZE message to the window, even if the window's size is not being changed. If this flag is not specified, WM_NCCALCSIZE is sent only when the window's size is being changed.
Hides the window.
Does not activate the window. If this flag is not set, the window is activated and moved to the top of either the topmost or non-topmost group (depending on the setting of the hWndInsertAfter parameter).
Discards the entire contents of the client area. If this flag is not specified, the valid contents of the client area are saved and copied back into the client area after the window is sized or repositioned.
Retains the current position (ignores X and Y parameters).
Does not change the owner window's position in the Z order.
Does not redraw changes. If this flag is set, no repainting of any kind occurs. This applies to the client area, the nonclient area (including the title bar and scroll bars), and any part of the parent window uncovered as a result of the window being moved. When this flag is set, the application must explicitly invalidate or redraw any parts of the window and parent window that need redrawing.
Same as the SWP_NOOWNERZORDER flag.
Prevents the window from receiving the WM_WINDOWPOSCHANGING message.
Retains the current size (ignores the cx and cy parameters).
Retains the current Z order (ignores the hWndInsertAfter parameter).
Displays the window.
ShowWindow options
SCF_ISSECURE
GDI+ Status codes
MSGFLT_*. New in Vista. Realiased in Windows 7.
Shell_NotifyIcon messages. NIM_*
SHAddToRecentDocuments flags. SHARD_*
Shell_NotifyIcon flags. NIF_*
Vista only.
Vista only.
Shell_NotifyIcon info flags. NIIF_*
XP SP2 and later.
XP and later.
Vista and later.
Windows 7 and later
XP and later. Native version called NIIF_ICON_MASK.
AC_*
The state of the icon. There are two flags that can be set independently.
NIS_HIDDEN = 1. The icon is hidden.
NIS_SHAREDICON = 2. The icon is shared.
Defines options that are used to set window visual style attributes.
A combination of flags that modify window visual style attributes.
Can be a combination of the WTNCA constants.
A bitmask that describes how the values specified in dwFlags should be applied.
If the bit corresponding to a value in dwFlags is 0, that flag will be removed.
If the bit is 1, the flag will be added.
Width of left border that retains its size.
Width of right border that retains its size.
Height of top border that retains its size.
Height of bottom border that retains its size.
initialize this field using: Marshal.SizeOf(typeof(APPBARDATA));
Delegate declaration that matches native WndProc signatures.
Delegate declaration that matches managed WndProc signatures.
Try to get the relative mouse position to the given handle in client coordinates.
The handle for this method.
The relative mouse position to the given handle.
https://docs.microsoft.com/en-us/windows/desktop/api/winuser/nf-winuser-getwindow
Sets attributes to control how visual styles are applied to a specified window.
Handle to a window to apply changes to.
Value of type WINDOWTHEMEATTRIBUTETYPE that specifies the type of attribute to set.
The value of this parameter determines the type of data that should be passed in the pvAttribute parameter.
Can be the following value:
WTA_NONCLIENT (Specifies non-client related attributes).
pvAttribute must be a pointer of type WTA_OPTIONS.
A pointer that specifies attributes to set. Type is determined by the value of the eAttribute value.
Specifies the size, in bytes, of the data pointed to by pvAttribute.
Retrieves the show state and the restored, minimized, and maximized positions of the specified window.
A handle to the window.
A pointer to the WINDOWPLACEMENT structure that receives the show state and position information.
Before calling GetWindowPlacement, set the length member to sizeof(WINDOWPLACEMENT).
GetWindowPlacement fails if lpwndpl-> length is not set correctly.
If the function succeeds, the return value is nonzero. If the function fails, the return value is zero.
Sets the show state and the restored, minimized, and maximized positions of the specified window.
A handle to the window.
A pointer to a WINDOWPLACEMENT structure that specifies the new show state and window positions.
Before calling SetWindowPlacement, set the length member of the WINDOWPLACEMENT structure to sizeof(WINDOWPLACEMENT).
SetWindowPlacement fails if the length member is not set correctly.
If the function succeeds, the return value is nonzero. If the function fails, the return value is zero.
Retrieves the length, in characters, of the specified window's title bar text (if the window has a title bar).
If the specified window is a control, the function retrieves the length of the text within the control. However,
GetWindowTextLength cannot retrieve the length of the text of an edit control in another application.
A handle to the window or control.
If the function succeeds, the return value is the length, in characters, of the text. Under certain
conditions, this value may actually be greater than the length of the text. For more information, see the following
Remarks section.
If the window has no text, the return value is zero. To get extended error information, call GetLastError.
Copies the text of the specified window's title bar (if it has one) into a buffer. If the specified window is
a control, the text of the control is copied. However, GetWindowText cannot retrieve the text of a control in another
application.
A handle to the window or control containing the text.
The buffer that will receive the text. If the string is as long or longer than the buffer, the
string is truncated and terminated with a null character.
The maximum number of characters to copy to the buffer, including the null character. If the
text exceeds this limit, it is truncated.
If the function succeeds, the return value is the length, in characters, of the copied string, not including
the terminating null character. If the window has no title bar or text, if the title bar is empty, or if the window or
control handle is invalid, the return value is zero. To get extended error information, call GetLastError.
This function cannot retrieve the text of an edit control in another application.
The MonitorFromRect function retrieves a handle to the display monitor that
has the largest area of intersection with a specified rectangle.
Pointer to a RECT structure that specifies the rectangle of interest in
virtual-screen coordinates
Determines the function's return value if the rectangle does not intersect
any display monitor
If the rectangle intersects one or more display monitor rectangles, the return value
is an HMONITOR handle to the display monitor that has the largest area of intersection with the rectangle.
If the rectangle does not intersect a display monitor, the return value depends on the value of dwFlags.
Loads an icon, cursor, animated cursor, or bitmap.
Handle to the module of either a DLL or executable (.exe) that contains the image to be loaded
Specifies the image to load
Specifies the type of image to be loaded.
Specifies the width, in pixels, of the icon or cursor
Specifies the height, in pixels, of the icon or cursor
This parameter can be one or more of the following values.
If the function succeeds, the return value is the requested value.If the function fails, the return value is zero. To get extended error information, call GetLastError.
Stop flashing. The system restores the window to its original state.
Flash the window caption
Flash the taskbar button.
Flash both the window caption and taskbar button.
This is equivalent to setting the FLASHW_CAPTION | FLASHW_TRAY flags.
Flash continuously, until the FLASHW_STOP flag is set.
Flash continuously until the window comes to the foreground.
Overload of SystemParametersInfo for getting and setting NONCLIENTMETRICS.
Overload of SystemParametersInfo for getting and setting HIGHCONTRAST.
GDI's DeleteObject
GDI+'s DisposeImage
Convert a native integer that represent a color with an alpha channel into a Color struct.
The integer that represents the color. Its bits are of the format 0xAARRGGBB.
A Color representation of the parameter.
A static class for retail validated assertions.
Instead of breaking into the debugger an exception is thrown.
Ensure that the current thread's apartment state is what's expected.
The required apartment state for the current thread.
The message string for the exception to be thrown if the state is invalid.
Thrown if the calling thread's apartment state is not the same as the requiredState.
Ensure that an argument is neither null nor empty.
The string to validate.
The name of the parameter that will be presented if an exception is thrown.
Ensure that an argument is neither null nor does it consist only of whitespace.
The string to validate.
The name of the parameter that will be presented if an exception is thrown.
Verifies that an argument is not null.
Type of the object to validate. Must be a class.
The object to validate.
The name of the parameter that will be presented if an exception is thrown.
Verifies that an argument is not null.
Type of the object to validate. Must be a class.
The object to validate.
The name of the parameter that will be presented if an exception is thrown.
Verifies that an argument is null.
Type of the object to validate. Must be a class.
The object to validate.
The name of the parameter that will be presented if an exception is thrown.
Verifies the specified statement is true. Throws an ArgumentException if it's not.
The statement to be verified as true.
Name of the parameter to include in the ArgumentException.
The message to include in the ArgumentException.
Verifies that the specified value is within the expected range. The assertion fails if it isn't.
The lower bound inclusive value.
The value to verify.
The upper bound exclusive value.
The name of the parameter that caused the current exception.
Shows the system menu at the current mouse position.
The window for which the system menu should be shown.
The mouse event args.
Display the system menu at a specified location.
The visual for which the system menu should be displayed.
The location to display the system menu, in logical screen coordinates.
Display the system menu at a specified location.
The visual for which the system menu should be displayed.
The location to display the system menu, in physical screen coordinates.
The dpi of is NOT used to calculate the final coordinates.
So you have to pass the final coordinates.
Display the system menu at a specified location.
The source/hwnd for which the system menu should be displayed.
The location to display the system menu, in physical screen coordinates.
The dpi of is NOT used to calculate the final coordinates.
So you have to pass the final coordinates.
Private constructor. The public way to access this class is through the static Current property.
Gets the horizontal DPI.
Critical as this accesses Native methods.
TreatAsSafe - it would be ok to expose this information - DPI in partial trust
Invalidates the rectangle or region that you specify in lprcUpdate or hrgnUpdate.
You can set only one of these parameters to a non-NULL value. If both are NULL, RDW_INVALIDATE invalidates the entire window.
Causes the OS to post a WM_PAINT message to the window regardless of whether a portion of the window is invalid.
Causes the window to receive a WM_ERASEBKGND message when the window is repainted.
Specify this value in combination with the RDW_INVALIDATE value; otherwise, RDW_ERASE has no effect.
Validates the rectangle or region that you specify in lprcUpdate or hrgnUpdate.
You can set only one of these parameters to a non-NULL value. If both are NULL, RDW_VALIDATE validates the entire window.
This value does not affect internal WM_PAINT messages.
Suppresses any pending WM_ERASEBKGND messages.
Excludes child windows, if any, from the repainting operation.
Includes child windows, if any, in the repainting operation.
Causes the affected windows, which you specify by setting the RDW_ALLCHILDREN and RDW_NOCHILDREN values, to receive WM_ERASEBKGND and WM_PAINT messages before the RedrawWindow returns, if necessary.
Causes the affected windows, which you specify by setting the RDW_ALLCHILDREN and RDW_NOCHILDREN values, to receive WM_ERASEBKGND messages before RedrawWindow returns, if necessary.
The affected windows receive WM_PAINT messages at the ordinary time.
Causes the dialog box to display all available colors in the set of basic colors.
http://msdn.microsoft.com/en-us/library/ms182161.aspx
http://msdn.microsoft.com/en-us/library/dd145064%28v=VS.85%29.aspx
http://msdn.microsoft.com/en-us/library/windows/desktop/ms647486%28v=vs.85%29.aspx
http://msdn.microsoft.com/en-us/library/windows/desktop/ms633528(v=vs.85).aspx
http://msdn.microsoft.com/en-us/library/windows/desktop/ms684175%28v=vs.85%29.aspx
http://msdn.microsoft.com/en-us/library/windows/desktop/ms683152%28v=vs.85%29.aspx
Base class for creating an icon control for icon packs.
Creates a new instance.
Inheritors should provide a factory for setting up the path data index (per icon kind).
The factory will only be utilized once, across all closed instances (first instantiation wins).
Identifies the dependency property.
Gets or sets the icon to display.
Identifies the dependency property.
Gets the icon path data for the current .
This custom popup can be used by validation error templates or something else.
It provides some additional nice features:
- repositioning if host-window size or location changed
- repositioning if host-window gets maximized and vice versa
- it's only topmost if the host-window is activated
Identifies the dependency property.
Gets or sets if the popup can be closed by left mouse button down.
Identifies the dependency property.
Gets or sets whether if the Popup should be always on top.
Causes the popup to update it's position according to it's current settings.
SetWindowPos options
AddValueChanged of dependency property descriptor results in memory leak as you already know.
So, as described here, you can create custom class PropertyChangeNotifier to listen
to any dependency property changes.
This class takes advantage of the fact that bindings use weak references to manage associations
so the class will not root the object who property changes it is watching. It also uses a WeakReference
to maintain a reference to the object whose property it is watching without rooting that object.
In this way, you can maintain a collection of these objects so that you can unhook the property
change later without worrying about that collection rooting the object whose values you are watching.
Complete implementation can be found here: http://agsmith.wordpress.com/2008/04/07/propertydescriptor-addvaluechanged-alternative/
Identifies the dependency property.
Gets or sets the value of the watched property.
This struct represent a Color in HSL (Hue, Saturation, Luminance)
Idea taken from here http://ciintelligence.blogspot.com/2012/02/converting-excel-theme-color-and-tint.html
and here: https://en.wikipedia.org/wiki/HSL_and_HSV
Creates a new HSL Color
Any System.Windows.Media.Color
Creates a new HSL Color
Alpha Channel [0;1]
Hue Channel [0;360]
Saturation Channel [0;1]
Luminance Channel [0;1]
Gets or sets the Alpha channel.
Gets or sets the Hue channel.
Gets or sets the Saturation channel.
Gets or sets the Luminance channel.
Gets the ARGB-Color for this HSL-Color
System.Windows.Media.Color
Gets a lighter / darker color based on a tint value. If is > 0 then the returned color is darker, otherwise it will be lighter.
Tint Value in the Range [-1;1].
a new which is lighter or darker.
Gets a lighter / darker color based on a tint value. If is > 0 then the returned color is darker, otherwise it will be lighter.
The input color which should be tinted.
Tint Value in the Range [-1;1].
a new which is lighter or darker.
Represents a theme.
Gets the key for the library theme instance.
Gets the key for the theme color scheme.
Gets the key for the color values being used to generate a runtime theme.
Initializes a new instance.
The URI of the theme ResourceDictionary.
The which created this instance.
Initializes a new instance.
The ResourceDictionary of the theme.
The which created this instance.
Get the origin of the theme.
The root containing all resource dictionaries belonging to this instance as
Gets the alternative color scheme for this theme.
Determining Ideal Text Color Based on Specified Background Color
http://www.codeproject.com/KB/GDI-plus/IdealTextColor.aspx
The background color.
Global options for .
Used to create the options being used to generate a single .
Options being used to generate one single .
Represents a theme.
Gets the key for the themes name.
Gets the key for the themes origin.
Gets the key for the themes display name.
Gets the key for the themes base color scheme.
Gets the key for the themes color scheme.
Gets the key for the themes primary accent color.
Gets the key for the themes showcase brush.
Gets the key for the themes runtime generation flag.
Gets the key for the themes high contrast flag.
Gets the key for the theme instance.
Initializes a new instance.
The first of the theme.
Gets whether this theme was generated at runtime.
Gets whether this theme is for high contrast mode.
Gets the name of the theme.
Gets the display name of the theme.
Get the base color scheme for this theme.
Gets the primary accent color for this theme.
Gets the color scheme for this theme.
Gets a brush which can be used to showcase this theme.
The root containing all resource dictionaries of all belonging to this instance as
The ResourceDictionaries that represent this theme.
The ResourceDictionaries that represent this theme.
Ensures that all from provided a for this .
This instance for fluent call usage.
Gets a flat list of all from all library themes.
A flat list of all from all library themes.
Adds a new to this .
The to add.
This instance for fluent call usage.
Class which is used as argument for an event to signal theme changes.
Creates a new instance of this class.
The target object for which was targeted by the theme change.
The for which was targeted by the theme change.
The old theme.
The new theme.
A class that allows for the detection and alteration of a theme.
Gets the name for the light base color.
Gets the name for the light base color.
Gets the name for the dark base color.
Gets the name for the dark base color.
Gets a list of all library theme providers.
Gets a list of all themes.
Gets a list of all available base colors.
Gets a list of all available color schemes.
Clears the internal themes list.
Gets the with the given name.
The or null, if the theme wasn't found
Gets the with the given name.
The or null, if the theme wasn't found
Gets the with the given resource dictionary.
from which the theme should be retrieved.
The or null, if the theme wasn't found.
Gets the inverse of the given .
This method relies on the "Dark" or "Light" affix to be present.
The app theme.
The inverse or null if it couldn't be found.
Returns BaseLight, if BaseDark is given or vice versa.
Custom Themes must end with "Dark" or "Light" for this to work, for example "CustomDark" and "CustomLight".
Determines whether the specified resource dictionary represents a .
This might include runtime themes which do not have a resource uri.
The resources.
true if the resource dictionary is an ; otherwise, false.
resources
Determines whether the specified resource dictionary represents a and was generated at runtime.
This might include runtime themes which do not have a resource uri.
The resources.
true if the resource dictionary is an ; otherwise, false.
resources
Change the theme for the whole application.
Change theme for the given window.
Change theme for the whole application.
The instance of Application to change.
The theme to apply.
Change theme for the given ResourceDictionary.
The FrameworkElement to change.
The theme to apply.
Change theme for the given ResourceDictionary.
The target object for which the theme change should be made. This is optional an can be null.
The ResourceDictionary to change.
The theme to apply.
Change base color and color scheme of for the given application.
The application to modify.
The base color to apply to the ResourceDictionary.
The color scheme to apply to the ResourceDictionary.
Change base color and color scheme of for the given window.
The FrameworkElement to modify.
The base color to apply to the ResourceDictionary.
The color scheme to apply to the ResourceDictionary.
Change base color and color scheme of for the given ResourceDictionary.
The target object for which the theme change should be made. This is optional an can be null.
The ResourceDictionary to modify.
The old/current theme.
The base color to apply to the ResourceDictionary.
The color scheme to apply to the ResourceDictionary.
Change base color for the given application.
The application to change.
The base color to apply to the ResourceDictionary.
Change base color for the given window.
The FrameworkElement to change.
The base color to apply to the ResourceDictionary.
Change base color of for the given ResourceDictionary.
The target object for which the theme change should be made. This is optional an can be null.
The ResourceDictionary to modify.
The old/current theme.
The base color to apply to the ResourceDictionary.
Change color scheme for the given application.
The application to change.
The color scheme to apply to the ResourceDictionary.
Change color scheme for the given window.
The FrameworkElement to change.
The color scheme to apply to the ResourceDictionary.
Change color scheme for the given ResourceDictionary.
The target object for which the theme change should be made. This is optional an can be null.
The ResourceDictionary to modify.
The old/current theme.
The color scheme to apply to the ResourceDictionary.
Changes the theme of a ResourceDictionary directly.
The ResourceDictionary to modify.
The theme to apply to the ResourceDictionary.
Scans the resources and returns it's theme.
If the theme can't be detected from the we try to detect it from .
Scans the application resources and returns it's theme.
The Application instance to scan.
Scans the resources and returns it's theme.
The FrameworkElement to scan.
If the theme can't be detected from the we try to detect it from .
Scans a resources and returns it's theme.
The ResourceDictionary to scan.
This event fires if the theme was changed
this should be using the weak event pattern, but for now it's enough
Invalidates global colors and resources.
Sometimes the ContextMenu is not changing the colors, so this will fix it.
No synchronization will happen.
Gets or sets whether changes to the "app mode" setting from windows should be detected at runtime and the current be changed accordingly.
Gets or sets whether changes to the accent color settings from windows should be detected at runtime and the current be changed accordingly.
Gets or sets whether changes to the high contrast setting from windows should be detected at runtime and the current be changed accordingly.
All synchronizations are active.
Works around an issue in the XamlReader.
Without this fix the XamlReader would not be able to read the XAML we produced earlier because it does not know where to look for the types.
The real issue is that we can't use the full namespace, with assembly hint, at compile time of the original project because said assembly does not yet exist and would cause a compile time error.
Hence we have to use this workaround to enable both.
The issue
The fixed version of .
If you have the following in your XAML file:
xmlns:markup="clr-namespace:MahApps.Metro.Markup"
xmlns:markupWithAssembly="clr-namespace:MahApps.Metro.Markup;assembly=MahApps.Metro"
It get's converted to:
xmlns:markup="clr-namespace:MahApps.Metro.Markup;assembly=MahApps.Metro"
xmlns:markupWithAssembly="clr-namespace:MahApps.Metro.Markup;assembly=MahApps.Metro"
Indicates whether a tooltip should follow the mouse cursor.
Sets whether a tooltip should follow the mouse cursor.
Gets the horizontal offset for the relative placement of the Tooltip.
Sets the horizontal offset for the relative placement of the Tooltip.
Gets the vertical offset for the relative placement of the Tooltip.
Sets the vertical offset for the relative placement of the Tooltip.