Click here to Skip to main content
12,758,605 members (34,678 online)
Rate this:
 
Please Sign up or sign in to vote.
See more: C# WPF
I have used two slider control and used ManipulationDelta event to handle multitouch events. and depending on the movement of the slider some process happen. Now the issue is in my canvas movement of the object get freeze when i move my slider through touch screen.

I read somewhere, optimizing the outside code will work. but in my case i am not able to change my code outside the event.

Here is my code,
private void slider_ManipulationDelta(object sender, ManipulationDelataEventArgs e)
{
 slider.value += e.DeltaManipulation.Translation.X;
 Canvas.SetLeft(rectangle, slider.value *2);
}


Edit :
1) I have removed all code from event but still it is freeze when dealing with multiple slider control
2) I have DispatcherTimer to update other UI element on Canvas on slider.Value

Thanks
Posted 12-Nov-12 20:58pm
Updated 13-Nov-12 3:47am
v5

1 solution

Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 1

i think you should use MultiThriding
  Permalink  
Comments
skokeh 13-Nov-12 2:41am
   
Try to create New Process then add your code in that Event
Process.add(....)
it should work
@AmitGajjar 13-Nov-12 2:49am
   
I have already done that. but not working.
@AmitGajjar 13-Nov-12 2:49am
   
even i am commenting the code in the event, UI get freezed.
skokeh 13-Nov-12 2:52am
   
Sometimes the Event will not work correctly in debugging mode\
try to create EXE and check it without debugging
@AmitGajjar 13-Nov-12 3:00am
   
i have release the exe and execute it. but no hope :(
skokeh 13-Nov-12 3:07am
   
i am not familiar with this ManipulationDelta but i think it's a 3rd Party Solution.
so make sure you have the last release, and check with them.
@AmitGajjar 13-Nov-12 3:10am
   
No it's Dot net framework event in WPF.

http://msdn.microsoft.com/en-us/library/system.windows.input.manipulationdelta.aspx
skokeh 13-Nov-12 3:28am
   
ok What is your Platform?
they Mention that it's supported for
Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

But i think it will not work Correctly with windows 7, am not sure
@AmitGajjar 13-Nov-12 3:32am
   
Windows 8, i7 processor, 4GB RAM, VS 2010 Ultimate.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

    Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web01 | 2.8.170217.1 | Last Updated 13 Nov 2012
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100