private void DragDropProviderItemsControl_Drop(object sender, DragEventArgs e)
        {
            ViewModels.SourceGroupModel grp = GetGroupModelFromSender(sender);
            if (grp == null)
            {
                return;
            }

            RadioLog.ViewModels.BaseSourceModel src = GetSourceModelFromDrop(e);
            if (src == null)
            {
                return;
            }

            e.Handled = true;

            if (src.SrcInfo.GroupId == GetGroupModelFromSender(sender).GroupId)
            {
                //could be re-ordering...
                RadioLog.ViewModels.BaseSourceModel tgt = GetTargetModelFromDrop(sender, e);
                if (tgt != null)
                {
                    ViewModels.BaseSourceModel[]      curModels = grp.SignalSources.ToArray();
                    List <ViewModels.BaseSourceModel> tmpList   = new List <ViewModels.BaseSourceModel>(curModels);
                    if (tmpList.Contains(src) && tmpList.Contains(tgt))
                    {
                        tmpList.Remove(src);
                        int indx = tmpList.IndexOf(tgt);
                        indx = Math.Max(indx, 0);
                        if (indx < (tmpList.Count - 2))
                        {
                            tmpList.Insert(indx, src);
                        }
                        else
                        {
                            tmpList.Add(src);
                        }
                        for (int i = 0; i < tmpList.Count; i++)
                        {
                            tmpList[i].DisplayOrder = ((i + 1) * 10);
                        }
                        Common.AppSettings.Instance.SaveSettingsFile();
                        grp.SignalSources.Sort();
                    }
                }

                return;
            }

            src.SrcInfo.GroupId = grp.GroupId;
            src.GroupInfo       = grp.GroupInfo;
            Common.AppSettings.Instance.SaveSettingsFile();
            Common.SignalSourceGroupChangeHolder changeHolder = new Common.SignalSourceGroupChangeHolder()
            {
                SignalSourceId = src.SrcInfo.SourceId, NewGroupId = grp.GroupId
            };
            Cinch.Mediator.Instance.NotifyColleagues <Common.SignalSourceGroupChangeHolder>("SOURCE_GROUP_CHANGE", changeHolder);
        }
        RadioLog.ViewModels.BaseSourceModel GetSourceModelDataContext(object o)
        {
            FrameworkElement fe = o as FrameworkElement;

            if (fe == null)
            {
                return(null);
            }
            RadioLog.ViewModels.BaseSourceModel src = fe.DataContext as RadioLog.ViewModels.BaseSourceModel;
            if (src == null)
            {
                return(GetSourceModelDataContext(fe.Parent));
            }
            else
            {
                return(src);
            }
        }