Question

I have a Silverlight 5 app with a PivotViewer in it. This is binding with the data source correctly, but I need to force a rebind on the templates without replacing the data source and re-setting the entire control. The results are.... interesting.

We are using a ValueConverter to determine what color a tile should be, and this value converter can be adjusted depending on an external selection. At this point the INotifyPropertyChange of all the records are fired and a rebind occurs, but only on the currently visible template. This leads to tiles changing colors when zooming in and out as the other views have no been refreshed.

Can anyone tell me if it is possible to implement this in such a way that it would affect all levels of zoom? And is it possible to trigger a rebind without firing the INotifyPropertyChange?

Thanks

Was it helpful?

Solution

After considerable investigation, I came across this issue in the microsoft bug tracker:

http://connect.microsoft.com/VisualStudio/feedback/details/768779/silverlight-forum-issue-with-changing-items-background-color-for-sl5-pivotviewer

The description:

Create a simple data class that implements INotifyPropertyChanged, change all the items' color every 5 secs, but some items have different background color with different zoom levels. This issue was reported from Silverlight forum: http://forums.silverlight.net/p/262082/654612.aspx/1?Re+PivotViewer+SL5+Dynamic+Collection+to+change+item+background+color

So I guess that explains what the problem was. Just waiting for a fix now.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top