View Single Post
Old 12-27-2007   #3 (permalink)
Eps
Guest
 
Posts: n/a

Re: WPF user controls interacting with each other

Serge Baltic wrote:
Quote:

> I don't think the controls should be interacting with each other at all.
>
> Besides the controls, the program should have a data model — some kind
> of data structures for the media library, one section of which
> represents a playlist, and the current status of the player. The
> controls reflect the current state of the data model by the means of
> databinding, and they change the model with databinding and commanding.
> They do not have to know anything of each other, or of the window they
> belong to.
>
> (H) Serge
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.)

I guess all the controls could then just bind to relevent properties of
the object.

I have played about a bit with data binding, how do you go about binding
to an objects property ?.

--
Eps