Method has two generic arguments (one referring to the other). After regionerate runs this method ends up below other regions and not grouped as desired.
/// <summary>
/// Binds the view model dictionary.
/// </summary>
/// <typeparam name="TDataObject">The type of the data object.</typeparam>
/// <typeparam name="TViewModel">The type of the view model.</typeparam>
/// <param name="sourceDictionary">The source dictionary.</param>
/// <param name="targetDictionary">The target dictionary.</param>
/// <param name="resetBinder">if set to <c>true</c> reset binder.</param>
/// <param name="binder">The binder.</param>
internal void BindViewModelDictionary<TDataObject, TViewModel>(IBindableDictionary<string, TDataObject> sourceDictionary, IDictionary<string, TViewModel> targetDictionary, bool resetBinder, out DictionaryBinder<string, TViewModel> binder)
where TViewModel : DataObjectViewModelBase<TDataObject>
where TDataObject : class, ISupportsKey
{
binder = new DictionaryBinder<string, TViewModel>(
new DisposingViewModelDictionary<TDataObject, TViewModel>
{
Transform = new DataObjectViewModelTransform<TDataObject, TViewModel>(this),
SourceDictionary = sourceDictionary
},
targetDictionary,
new WeakKeyValueChangedEventAttacher<string, TViewModel>(this.Dispatcher)
);
if (resetBinder)
{
using (this.CreateBusyScope())
{
binder.Reset();
}
}
}
