Hello,
> I have a datable in the medialibrary control that contains (amongst
> other things) the path of every song. Are you suggesting I create a
> new object which encapsulates the datatable as well as exposing more
> properties (like the play/pause/stop status and the current song,
> etc.) There're built-in means for binding to databases, their specific queries
and views. That fits nicely into the task of presenting the media library,
which is basically a database view. The only extra information you need is
the current selection, which affects the Play action.
> I guess all the controls could then just bind to relevent properties
> of the object. Yes. The object gives out the database connection, which gets presented as
a list, gets back the selection info, handles play/stop/pause commands. Logically,
the database object and the playback object should better be separate entities,
but that's an implementation detail.
> I have played about a bit with data binding, how do you go about
> binding to an objects property ?. The "{Binding}" markup extension has a source and a path relative to the
source. If the source is the object itself, then the path is just the property
name. The source can be specified either in the binding itself or by setting
the DataContext attribute on some containing XAML element.
(H) Serge