Databinding examples

366 views
Skip to first unread message

Michael Both

unread,
Aug 18, 2014, 6:15:43 PM8/18/14
to eto-...@googlegroups.com
Hi all

This framework looks very interesting to me, however I can't really find any examples; I'm especially interested databinding. I'm developing for Windows and Xamarin (Mac) platforms with a shared PCL.

Any tips or pointer or code I can look at?

Thanks

Mike

curtis

unread,
Aug 29, 2014, 12:51:55 PM8/29/14
to eto-...@googlegroups.com
Hey,

The data binding stuff is still a little fresh, though already very powerful.  I'm working on a tutorial that will go through some of the basics of data binding and should have that done in a few days.

The Eto.Test application does do some data binding, which you can search for ".Bind" and you'll pretty much see all the examples.

Binding can be done to a DataContext, a specific object instance, or directly get/set values.   You can bind using reflection with the PropertyBinding, using delegates using DelegateBinding, or to an object in an IList/Array using a ColumnBinding.

I'll let you know when the tutorial has been pushed to github, and I'll start working on a wiki entry for it as well to go into more detail.

Cheers!
Curtis.

Michael Both

unread,
Aug 29, 2014, 2:17:25 PM8/29/14
to eto-...@googlegroups.com
Hi Curtis

Ok, thanks, I'll check things out and will look forward to the tutorial also.

Mike

curtis

unread,
Aug 30, 2014, 3:21:38 AM8/30/14
to eto-...@googlegroups.com
It's now done! Here's a simple example of data binding:


It shows how to bind a TextBox.TextBinding to a DataContext, object instance, or without any object (direct).

Other controls have similar binding properties, such as CheckBox.CheckedBinding, ListBox.SelectedIndexBinding, etc. which can be used the same way.

Next tutorial will show how to bind any property of a control. (;
Reply all
Reply to author
Forward
0 new messages