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
Post a Comment