c# - Determine element name based on touch event -
how can determine element name,other properties, based on touch event given by,
touch.framereported += new touchframeeventhandler(onframereported); private void onframereported(object sender, touchframeeventargs e) { touchpoint primarytouchpoint = e.getprimarytouchpoint(null); touchpointcollection points = e.gettouchpoints(null); foreach (touchpoint point in points) { if (point.action == touchaction.down)
so far have tried, point.touchdevice.directlyover
gives me element type (shape
,button
, etc). want figure out x:name
.
unfortunately, there no way retrieve x:name value @ runtime. see similar post.
edit: however, having said that, touchpoint.touchdevice.directlyover uielement can cast frameworkelement has name property. use name property instead of x:name property , information way.
Comments
Post a Comment