Friday, 15 February 2013

c# - Getting Two Buttons to Execute the Same Funcion - How to Determine Which One? -



c# - Getting Two Buttons to Execute the Same Funcion - How to Determine Which One? -

i've searched on msdn , here, doen't seem have answer. assume have xaml code:

<button name="button1" click="buttonhandler"> other stuff </button> <button name="button2" click="buttonhandler"> other stuff </button>

and in cs code have simple handler:

private void buttonhandler(object sender, routedeventargs e) { }

i'm trying figure out how give each button, dynamically created frame data, have 1 handler , able uniquely identify (name maybe?). , utilize handler able sort out unique identifier perform action click event.

i'm not finding much, mean missing obvious....

the sender parameter buttonhandler method button clicked. name, or other identifier. not plenty requirements?

c# xaml button windows-runtime

No comments:

Post a Comment