Hi,
How to get the tile that is clicked? I am trying to check source in "TileManager_Preview_MouseleftButtonUp" handler, but not able to get the Tile object reference.
Attached the sample project.
Can anyone help out?
Hello nknprasad,
Thank you for posting!
I have been looking into your post and the sample application, that you have attached to the post. In the sample application you are creating the event handler right after the Initialize method and you are hooking to the event in the AddInternalNodeTileToTileGroup method.
In order for the event to fire I can suggest to place the handler of the event(Tile_PreviewMouseLeftButtonUp) after the AddInternalNodeTileToTileGroup method. This way when you click on one of the inner tiles the event would fire.
Please do not hesitate to let me know if you have any further questions on this matter.
I tried as per your suggestion, but it is still behaving the same.
Attached the modified sample.
I have been looking into the sample application. What I can suggest is to create a style for the XamTile. In this style you can create an EventSetter for the PreviewMouseLeftButtonUp event of the XamTile.
I have modified the sample application, that you have provided for you. Please find it attached and feel free to let me know if you have any further questions on this matter.
This helped me.
Thank You Gergana.
Thank you for the feedback. I am glad I was able to help.
Hello Prasad,
I am just checking if you have any further questions on this matter. Please do not hesitate to let me know if you do.
I have been looking into your question. What I can suggest is to use the 'sender' instead of the e.Source as the PreviewMouseLeftButtonUp event is handled by the XamTile and the sender is the XamTile itself.
SORRY for troubling again.
I just wanted to keep the Header display empty without any text/data and only keep only buttons, so I pushed the EmpNo also to Content part.
Again it is behaving differently. Not able to get the Tile object in PreviewMouseUp :-(
It is working if I set the HeaderPath to EmpNo. And if I comment this "HeaderPath="EmpNo" it is not working. How this tile events are linked to HeaderPath binding ?
Is there a way to get tile object in this case?
Attached modified sample.
Regards,
Prasad