public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
{
ObservableCollection<PivotItem> boundControls = new ObservableCollection<PivotItem>();
var redditViewModelCollection = value as ObservableCollection<ViewModelBase>;
redditViewModelCollection.CollectionChanged += (sender, arg) => redditViewModelCollection_CollectionChanged(sender, arg, boundControls);
foreach (var viewModel in redditViewModelCollection)
{
boundControls.Add(MapViewModel(viewModel));
}
if (boundControls.Count > 0 && boundControls[0].Content == null)
{
boundControls[0].Content = new RedditView { DataContext = boundControls[0].DataContext };
}
return boundControls;
}