//will complete the drag operation by removing the item from the source collection //if the current effect was copy then you would not remove it private void Scatter_DragCompleted(object sender, SurfaceDragCompletedEventArgs e) { if (e.Cursor.CurrentTarget != scatter && e.Cursor.Effects == DragDropEffects.Move) { ScatterItems.Remove(e.Cursor.Data as PhotoData); e.Handled = true; } }
private void MainLibraryStack_DragCompleted(object sender, SurfaceDragCompletedEventArgs e) { Uri data = e.Cursor.Data as Uri; if (!items.Contains <Uri>(data)) { items.Add(data); } }
private void scatter_DragCompleted(object sender, SurfaceDragCompletedEventArgs e) { //if (e.Cursor.CurrentTarget != scatter && e.Cursor.Effects == DragDropEffects.Move) // { // Movie data = e.Cursor.Data as Movie; // price += data.Price; // totalPriceLabel.Content = Price; //} }
private void DragCompleted(object sender, SurfaceDragCompletedEventArgs e) { AppState.RestoreVisibleState(); }
private void PublicationsSurfaceListBox_DragCompleted(object sender, SurfaceDragCompletedEventArgs e) { Console.WriteLine("PublicationsSurfaceListBox_DragCompleted"); //((PublicationsViewModel)this.DataContext).Routed_PublicationsSurfaceListBox_DragCompleted(sender, e); }
private void OnDragCompleted(object sender, SurfaceDragCompletedEventArgs e) { if (e.Cursor.Effects == DragDropEffects.Move) { setControl((e.Cursor.Data as DataItem).ItemControl); } }
private void ImgScatterView_DragCompleted(object sender, SurfaceDragCompletedEventArgs e) { }
private void ImgScatterView_DragCompleted(object sender, SurfaceDragCompletedEventArgs e) { }
/// <summary> /// Removes the dragged item from the associated collection /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void DragCompleted(object sender, SurfaceDragCompletedEventArgs e) { Menu.Menu removed = e.Cursor.Data as Menu.Menu; SurfaceListBox bar = e.Cursor.DragSource as SurfaceListBox; if (e.Cursor.CurrentTarget != bar) { ObservableCollection<Menu.Menu> collection = bar.GetValue(SurfaceListBox.ItemsSourceProperty) as ObservableCollection<Menu.Menu>; int index = collection.IndexOf(removed); if (index < 0 || index>collection.Count) { return; } collection.Remove(removed); if (MenuList.Count >= MaxMenus) { //puts the removed Menu back into the history //because it will not be accepted in the //scatterview collection.Insert(index, removed); } e.Handled = true; } }
private void Scatter_DragCompleted(object sender, SurfaceDragCompletedEventArgs e) { if (e.Cursor.CurrentTarget != scatter && e.Cursor.Effects == DragDropEffects.Move) { ScatterItems.Remove(e.Cursor.Data as PhotoData); e.Handled = true; } curClipArt.Add(e.Cursor.Data as PhotoData); }
private void ListBox_DragCompleted5(object sender, SurfaceDragCompletedEventArgs e) { if (e.Cursor.CurrentTarget != ListBox5 && e.Cursor.Effects == DragDropEffects.Move) { //LibraryItems.Remove(e.Cursor.Data as PhotoData); SurfaceListBoxItem boxItem = ListBox5.ItemContainerGenerator.ContainerFromItem(e.Cursor.Data as PhotoData) as SurfaceListBoxItem; boxItem.Opacity = 1.0; e.Handled = true; } curClipArt.Remove(e.Cursor.Data as PhotoData); }
private void MainLibraryStack_DragCompleted(object sender, SurfaceDragCompletedEventArgs e) { Uri data = e.Cursor.Data as Uri; if (!items.Contains<Uri>(data)) { items.Add(data); } }
private void DragCompleted(object sender, SurfaceDragCompletedEventArgs e) { // If the operation is Move, remove the data from drag source. if (e.Cursor.Effects == DragDropEffects.Move) { string ipaddress = ""; int port = 3000; DataItem di = (DataItem)e.Cursor.Data; // MessageBox.Show(di.ImageSource); TagVisualization ta = (TagVisualization) e.Cursor.CurrentTarget; // MessageBox.Show(""+ta.VisualizedTag.Value); if (ta.VisualizedTag.Value == 5) { ipaddress = NEXUS_IP_ADDRESS; // Hardcoded IP address of first phone } else if (ta.VisualizedTag.Value == 6) { ipaddress = S3_IP_ADDRESS; // Second phone's IP address } // Send Image - do make the path right BasicImageSender.SendImage(ipaddress, port, di.ImageSource); SourceItems.Remove(e.Cursor.Data as DataItem); } }