Quantcast
Channel: Silverlight Issue Tracker Rss Feed
Viewing all articles
Browse latest Browse all 801

Closed Issue: Primitives.LoopingSelector implementation of DataSource property [7946]

$
0
0
<p>I've reused this control and run into few issues. This bug tracks implementation of the DataSource property. In the setter it registers value_SelectionChanged callback to be called when value.SelectionChanged event is raised. This is a no-no to do from the setter of the dependecy property. It's never called. This should be done in the OnDataModelChanged:</p>
<p> private static void OnDataModelChanged(DependencyObject obj, DependencyPropertyChangedEventArgs e)</p>
<p> {</p>
<p> LoopingSelector picker = (LoopingSelector)obj;</p>
<p> if (e.OldValue != e.NewValue)</p>
<p> {</p>
<p> if (e.OldValue != null)</p>
<p> {</p>
<p> ((ILoopingSelectorDataSource)e.OldValue).SelectionChanged -= picker.value_SelectionChanged;</p>
<p> }</p>
<p>&#160;</p>
<p> if (e.NewValue != null)</p>
<p> {</p>
<p> ((ILoopingSelectorDataSource)e.NewValue).SelectionChanged += picker.value_SelectionChanged;</p>
<p> }</p>
<p> picker.UpdateData();</p>
<p> }</p>
<p> }</p>
Comments:

Closing all issues marked as fixed, dupe or no repro for the Windows Phone Toolkit September 2012 release.


Viewing all articles
Browse latest Browse all 801

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>