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.

how x:name value runtime

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

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

javascript - Clean way to programmatically use CSS transitions from JS? -

android - send complex objects as post php java -