Skip to content

Please share more details about InputNonClientPointerSource #3849

Answered by zhuxb711
zhuxb711 asked this question in Q&A
Discussion options

You must be logged in to vote

@DarranRowe Thanks.
Here is the code that helps set the NonClient region using InputNonClientPointerSource. Please correct me if any misunderstanding.
Hope the code could help someone who seeking the solution on InputNonClientPointerSource

public static void SetNonClientRegionElementsOnTitleBar(this Window Window, FrameworkElement Element, params FrameworkElement[] ExceptElements)
{
    if (ExceptElements.Contains(Element))
    {
        throw new ArgumentException($"\"{nameof(ExceptElements)}\" contains the \"{nameof(Element)}\" which is not allowed", nameof(Element));
    }

    float DpiScaleFactor = User32.GetDpiScaleFactorFromWindow(Window.GetWindowHandle());

    if (DpiScaleFactor > 0

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
2 replies
@zhuxb711
Comment options

@DarranRowe
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by zhuxb711
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants