Click here to Skip to main content
Rate this: bad
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
Posted 12-Nov-12 20:58pm
Edited 13-Nov-12 3:47am

1 solution

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

Solution 1

i think you should use MultiThriding
skokeh at 13-Nov-12 2:41am
Try to create New Process then add your code in that Event
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.
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 OriginalGriff 277
1 Maciej Los 210
2 BillWoodruff 195
3 DamithSL 195
4 Richard MacCutchan 178
0 OriginalGriff 5,130
1 DamithSL 4,157
2 Maciej Los 3,670
3 Kornfeld Eliyahu Peter 3,470
4 Sergey Alexandrovich Kryukov 2,821

Advertise | Privacy | Mobile
Web03 | 2.8.141216.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