Click here to Skip to main content
Rate this: bad
good
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 19:58pm
Edited 13-Nov-12 2: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 at 13-Nov-12 2:41am
   
Try to create New Process then add your code in that Event
Process.add(....)
it should work
@AmitGajjar at 13-Nov-12 2:49am
   
I have already done that. but not working.
@AmitGajjar at 13-Nov-12 2:49am
   
even i am commenting the code in the event, UI get freezed.
skokeh at 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 at 13-Nov-12 3:00am
   
i have release the exe and execute it. but no hope :(
skokeh at 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 at 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 at 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 at 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
0 CPallini 510
1 Sergey Alexandrovich Kryukov 428
2 George Jonsson 298
3 Pheonyx 218
4 OriginalGriff 200
0 OriginalGriff 4,813
1 CPallini 3,850
2 Sergey Alexandrovich Kryukov 3,224
3 George Jonsson 2,552
4 Gihan Liyanage 2,186


Advertise | Privacy | Mobile
Web02 | 2.8.140905.1 | Last Updated 13 Nov 2012
Copyright © CodeProject, 1999-2014
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