PlaybackPositionDatabinding doesn't work

Jul 12, 2010 at 6:08 PM
Edited Jul 12, 2010 at 6:09 PM

I'm using MVVM for my current project and was binding to PlaybackPosition in SMF 2 RC and it was working great but now with SMF 2 Blend refuses to bind to it due to it having no public setter. I see there is a new PlaybackPositionDatabinding which I expected to be a safe property to bind to.. but it never gets set. I checked out the source code and it seems to only work as setter for the current position. When doing a get on it, it always returns Timespan.Zero.

First I thought that if I just add in whenever PlaybackPosition is updated to update PlaybackPositionDatabinding but I see that there is PlaybackPosition = PlaybackPositionDatabinding in the on changed for PlayBackPositionDataBinding. Which could cause an ugly circular reference. Could be short circuited by checking to see if PlaybackPositionDatabinding == PlaybackPosition when updating PlaybackPosition

What is the reason for splitting these?

Jul 12, 2010 at 6:34 PM

Well after adding it back in to update mutually, I think I see why, playback performance suffers. Hmm.. guess I'm going to have to bite the bullet and have a reference to the SMFPlayer object in my ViewModel.