Is there any way to invoke holding event in wpf while long press the control as like in UWP? -


i have searched lot in internet , found there event called onholding() in winrt , uwp platforms invoke when long press control. there no such event in wpf. please tell me there way handle such event in wpf or not?

there mousedown(), mouseup(), touchdown() , touchup() events. if have property:

private datetime timeofholdstart { get; set; } 

which set datetime.now on mousedown() or touchdown(), on mouseup() or touchup() compare length of hold minimum value

if(datetime.now.subtract(timeofholdstart) >= new timespan(0,0,1)) {     // stuff.. } 

note, see https://wpf.2000things.com/2013/02/05/749-handling-the-touchenter-and-touchleave-events/ quirks of touch events, example if slide finger control, touchdown() doesn't fired, touchenter() does.


Comments

Popular posts from this blog

javascript - Laravel datatable invalid JSON response -

java - Exception in thread "main" org.springframework.context.ApplicationContextException: Unable to start embedded container; -

sql server 2008 - My Sql Code Get An Error Of Msg 245, Level 16, State 1, Line 1 Conversion failed when converting the varchar value '8:45 AM' to data type int -