public object Convert(object value, Type targetType, object parameter, string language)
{
if (value == null) return null;
Type valueType = value.GetType();
if (valueType == typeof(IncremetalLoadingCollection))
return value as IncremetalLoadingCollection;
if (valueType == typeof(ObservableCollection<ArcGISPortalItem>))
return value as ObservableCollection<ArcGISPortalItem>;
if (valueType == typeof(ObservableCollection<ArcGISPortalGroup>))
return value as ObservableCollection<ArcGISPortalGroup>;
if (valueType == typeof(PortalGroupCollection))
return value as ObservableCollection<ArcGISPortalGroup>;
if (valueType == typeof(PortalItemCollection))
return value as ObservableCollection<ArcGISPortalItem>;
if (valueType == typeof(ObservableCollection<CollectionAndTitle>))
return value as ObservableCollection<CollectionAndTitle>;
else
return null;
}