1

Some of the Eto.Forms controls (like button) have an ICommand property exposed which can be databound as follows

button.BindDataContext(c => c.Command, (MainViewModel model) => model.ClickCommand);

However if you try to build anything serious you soon run into events you want to bind commands to that have no command exposed on the control just a .net event.

For example if you want to be able to detect a click on a label, there is no ICommand exposed only a MouseUp event.

In the past I have subtyped the controls to add the commands I need, however this is a lot of work and I wonder if there is a way to do this binding without inheriting from the label.

trampster
  • 8,598
  • 4
  • 37
  • 52

0 Answers0