public override UIElement GetVisualFeedback(IDataObject obj) { try { CtlMExpanderItem elt = ExtractElement(obj) as CtlMExpanderItem; elt.Width = 100; elt.Height = 130; elt.Opacity = 0.5; elt.IsHitTestVisible = false; DoubleAnimation anim = new DoubleAnimation(0.75, new Duration(TimeSpan.FromMilliseconds(500))); anim.From = 0.25; anim.AutoReverse = true; anim.RepeatBehavior = RepeatBehavior.Forever; elt.BeginAnimation(UIElement.OpacityProperty, anim); return(elt); } catch { CtlExpanderItem elt = ExtractElement(obj) as CtlExpanderItem; elt.Width = 100; elt.Height = 27; elt.Opacity = 0.5; elt.IsHitTestVisible = false; DoubleAnimation anim = new DoubleAnimation(0.75, new Duration(TimeSpan.FromMilliseconds(500))); anim.From = 0.25; anim.AutoReverse = true; anim.RepeatBehavior = RepeatBehavior.Forever; elt.BeginAnimation(UIElement.OpacityProperty, anim); return(elt); } }
public override void OnDropCompleted(IDataObject obj, Point dropPoint) { string xamlString = obj.GetData("VMuktiDragAndDropModule") as string; XmlReader reader = XmlReader.Create(new StringReader(xamlString)); CtlMExpanderItem elt = XamlReader.Load(reader) as CtlMExpanderItem; string[] strTag = elt.Tag.ToString().Split(','); if (strTag.Length == 3) { ClsPermissionCollection objCPC = ClsPermissionCollection.Get_PermissionRefModule(int.Parse(strTag[0]), VMuktiAPI.VMuktiInfo.CurrentPeer.RoleID); int[] arrPermissionValue = new int[objCPC.Count]; for (int percount = 0; percount < objCPC.Count; percount++) { arrPermissionValue[percount] = objCPC[percount].PermissionValue; } (TargetUI as ItemsControl).Items.RemoveAt((TargetUI as ItemsControl).Items.Count - 1); ctlPOD objTempPOD = new ctlPOD(int.Parse(strTag[0]), elt.Caption, strTag[2], null, arrPermissionValue, false, "fromLeftPane", (TargetUI as ItemsControl), true, null); objTempPOD.OwnerPodIndex = VMukti.App.podCounter++; (((TargetUI as ItemsControl).Parent as Grid).Parent as ctlGrid).SetGridSplliterVisiblity(true); } }