Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6997479
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T20:17:19+00:00 2026-05-27T20:17:19+00:00

I am implementing the solution described here in a MVVM project: http://nui.joshland.org/2010/04/why-wont-wpf-controls-work-with-touch.html But the

  • 0

I am implementing the solution described here in a MVVM project: http://nui.joshland.org/2010/04/why-wont-wpf-controls-work-with-touch.html

But the problem is that if I implement the TouchDown and TouchUp event handlers in the UserControl in my XAML then I run into a problem where other GroupView cannot get the Window Messages for flicks anymore — OR flicks are not able to be processed so their associated window message are never sent.

The top-down structure of the views is:
ButtonsView — has Touch event handlers
GroupView — has Mouse event handlers and the Flicks event handlers

I’m using this in the code-behind to hook the flicks and handle them:

    private void UserControl_Loaded(object sender, RoutedEventArgs e)
    {
        HwndSource source = PresentationSource.FromVisual(this) as HwndSource;
        source.AddHook(WndProc);
    }

    private IntPtr WndProc(IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam, ref bool handled)
    {
        if (msg == Flicks.WM_TABLET_FLICK)
        {
            Flick flick = Flicks.ProcessMessage(lParam, wParam);
            if (flick != null)
            {
                if (flick.Data.Direction == FLICKDIRECTION.FLICKDIRECTION_LEFT)
                    Scroller("left"); //scrolls left
                else if (flick.Data.Direction == FLICKDIRECTION.FLICKDIRECTION_RIGHT)
                    Scroller("right"); //scrolls right
                else if (flick.Data.Direction == FLICKDIRECTION.FLICKDIRECTION_UP)
                    Scroller("up"); //move up
                else if (flick.Data.Direction == FLICKDIRECTION.FLICKDIRECTION_DOWN)
                    Scroller("down"); //move down
                    handled = true;
            }
        }
        return IntPtr.Zero;
    }

Thoughts/Suggestions? I’m pretty new to WPF.
Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T20:17:19+00:00Added an answer on May 27, 2026 at 8:17 pm

    I solved this by capturing the mouse events and flick events in the ButtonsView so that they wouldn’t tunnel down to the GroupView.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am implementing the solution for TabActivity with activities in the TabHost as described
So I was asking a question on here, got around to implementing the solution,
We are currently implementing a solution where we have a collection which we want
I'm thinking about a good solution for implementing a sign up/login system that works
I was implementing the the feature show all files in the Solution Explorer in
There are many solutions geared toward implementing user-space threads. Be it golang.org goroutines, python's
I'm implementing a solution in ASP.NET MVC that later can be applied to couple
I'm implementing a SSO solution with SAML using OpenAM. I'm a very beginner on
We're implementing a new solution in our classic ASP environment that's using COM interop
I am implementing a solution in Solr where I have a lot of values

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.