I would create a command for each button and delegate for each "handler". Than you can expose delegates to the user (final app) and internally call them on Execute()
method on the commands. Something like this:
public class MyControl : UserControl {
public ICommand FirstButtonCommand {
get;
set;
}
public ICommand SecondButtonCommand {
get;
set;
}
public Action OnExecuteFirst {
get;
set;
}
public Action OnExecuteSecond {
get;
set;
}
public MyControl() {
FirstButtonCommand = new MyCommand(OnExecuteFirst);
FirstButtonCommand = new MyCommand(OnExecuteSecond);
}
}
Of cource, "MyCommand" needs to implement ICommand. You also need to bind your commands to coresponding buttons. Hope this helps.