locked
wpf touchdown event using alot of cpu RRS feed

  • Question

  • Everytime i use touchdown event in a button/rectangle or whatever it uses a lot of cpu the more objects i touch. Is there another way to make an event happen only once when i touch a object because touchdown is doing something that is constantly using cpu while i hold down. In my program i need to make something happen once when i touch an object and do another thing once when i stop touching it



    Friday, February 19, 2016 11:21 PM

All replies

  • When you say "the more objects I touch" this would be at once?

    I've not used multitouch myself.

    Isn't touch and hold equivalent to mouse button down and mouse button up though?

    This seems to say so:

    https://msdn.microsoft.com/en-us/library/dd940543%28VS.85%29.aspx?f=255&MSPPError=-2147217396

    You could try PreviewMouseLeftButtonDown and up.

    .

    Is the cpu usage causing any problems or is it just something you noticed happen?

    If it's causing problems then that sounds like a bug.

    You could raise an issue on connect:

    https://connect.microsoft.com/VisualStudio

    Note: there are no separate product categories for wpf, windows forms etc. They're all in visual studio and .net (which seems a bit odd to me).


    Hope that helps.

    Technet articles: WPF: Layout Lab; All my Technet Articles

    Saturday, February 20, 2016 10:15 AM
  • When you say "the more objects I touch" this would be at once?


    I just saw that its not only on the objects, its anywhere in the whole application. If you want to try it make a wpf application and run it, then see in task manager how your cpu usuage go up the more fingers you leave touching down in your screen. 4 fingers down on my screen use about 10% of my cpu, this is really bad. And the pc im using has a core i5 inside, its not a beast but it is what you expect most people to have as a pc in terms of hardware.


    Saturday, February 20, 2016 5:57 PM
  • I don't have a touch screen machine to try.


    Hope that helps.

    Technet articles: WPF: Layout Lab; All my Technet Articles

    Saturday, February 20, 2016 7:20 PM