Hi Mike,
The HTMLUIControl supports bubbling events. If some element raises an event (for instance Click), the parent elements also raise the same event if they support it.
This allows us to handle the Click event of a top level Element and get the BubblingEventArgs using the static HTMLUIControl.GetBubblingEventArgs( EventArgs e) method.
The RootSender of the BubblingEventArgs is the Button that was clicked:
private void body_OnClick(object sender, EventArgs e)
{
BubblingEventArgs bargs = HTMLUIControl.GetBublingEventArgs(e);
BaseElement elem = bargs.RootSender as BaseElement;
if( elem != null && elem is INPUTElementImpl)
{
if(elem.ID == "Button1")
{
Console.WriteLine("Button 1 clicked");
}
else if(elem.ID == "Button2")
{
Console.WriteLine("Button 2 clicked");
}
else if(elem.ID == "Button3")
{
Console.WriteLine("Button 3 clicked");
}
else if(elem.ID == "Button4")
{
Console.WriteLine("Button 4 clicked");
}
}
}
Please refer to the sample linked to below:
http://www.syncfusion.com/support/user/uploads/htmluibubblingevents.zip
Thanks,
Davis