Inheritance: IDragItemsStartingEventArgs
コード例 #1
0
        private void GridViewDragItemsStarting(object sender, DragItemsStartingEventArgs e)
        {
            var item = e.Items.FirstOrDefault();
            if (item == null)
                return;

            e.Data.Properties.Add("item", item);
            e.Data.Properties.Add("gridSource", sender);
        }
コード例 #2
0
 private void SourceListView_DragItemsStarting(object sender, DragItemsStartingEventArgs e)
 {
     ListView source = sender as ListView;
     if (source.Equals(ActionSequence)) {
         DDH = new DragDropHelper<CortanaCommand>(ActionSequence, ActionPicker);
     } else {
         DDH = new DragDropHelper<CortanaCommand>(ActionPicker, ActionSequence);
     }
     DDH.SourceListView_DragItemsStarting(sender, e);
 }
コード例 #3
0
ファイル: UIDemo.xaml.cs プロジェクト: fqncom/tomcraporigami
 private void ListView_DragItemsStarting(object sender, DragItemsStartingEventArgs e)
 {
     //foreach (var item in e.Items)
     //{
     //    // If you want to drop only a subset of the dragged items,
     //    // then make each key unique. 
     //    e.Data.Properties.Add("MyApp.MyCity", item);
     //}
     //DragDropEffects
 }
コード例 #4
0
 private void gview_DragItemsStarting(object sender, DragItemsStartingEventArgs e)
 {
     var item = e.Items.FirstOrDefault() as Book;
     if (item == null)
     {
         e.Cancel = true;
         return;
     }
     e.Data.Properties.Add("item", item);
     e.Data.Properties.Add("gridSource", sender);
 }
コード例 #5
0
        private void GridView_DragItemsStarting(object sender, DragItemsStartingEventArgs e)
        {
            var items = new StringBuilder();
          
            Monster m = e.Items[0] as Monster;
            items.Append(m.ID.ToString() + "\n");

            e.Data.SetText(items.ToString());
            e.Data.RequestedOperation = DataPackageOperation.Copy;

        }
コード例 #6
0
 /// <summary>
 /// DragItemsStarting is called when the Drag and Drop operation starts
 /// We take advantage of it to set the content of the DataPackage
 /// as well as indicate which operations are supported
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void SourceListView_DragItemsStarting(object sender, DragItemsStartingEventArgs e)
 {
     // Prepare a string with one dragged item per line
     var items = new StringBuilder();
     foreach (var item in e.Items)
     {
         if (items.Length > 0) items.AppendLine();
         items.Append(item as string);
     }
     // Set the content of the DataPackage
     e.Data.SetText(items.ToString());
     // As we want our Reference list to say intact, we only allow Copy
     e.Data.RequestedOperation = DataPackageOperation.Copy;
 }
コード例 #7
0
        //DragAndDrop trought two ListViews
        private void ListPerson_DragItemsStarting(object sender, Windows.UI.Xaml.Controls.DragItemsStartingEventArgs e)
        {
            var items = new StringBuilder();

            foreach (Worker item in e.Items)
            {
                if (items.Length > 0)
                {
                    items.AppendLine();
                }
                //Get Name as ID to identify Person
                //items.Append(item.Name);
            }
            e.Data.SetText(items.ToString());
            //Icon When Drag
            e.Data.RequestedOperation = DataPackageOperation.Move;
            //Save Source of the dragAndDrop Action
            e.Data.Properties.Add("SourceList", sender as ListView);
        }
コード例 #8
0
 private void OnDragItemsStarting(object sender, DragItemsStartingEventArgs e)
 {
     _draggedFrom = sender as GridView;
     _draggedPiece = e.Items.OfType<PieceElement>().First();
 }
コード例 #9
0
 /// <summary>
 /// DragtemsStarting is called for D&D and reorder as the framework does not
 /// know wherer the user will drop the items. Reorder means that the target
 /// and the source ListView are the same.
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void TargetListView_DragItemsStarting(object sender, DragItemsStartingEventArgs e)
 {
     // The ListView is declared with selection mode set to Single.
     // But we want the code to be robust
     if (e.Items.Count == 1)
     {
         e.Data.SetText(e.Items[0] as string);
         // Reorder or move to trash are always a move
         e.Data.RequestedOperation = DataPackageOperation.Move;
         _deletedItem = null;
     }
 }
コード例 #10
0
 void ListViewBase_OnDragItemsStarting(object sender, DragItemsStartingEventArgs e)
 {
     var disk = e.Items.First() as Disk;
     e.Data.Properties.Add(Constants.SOURCE_DISK, disk);
     e.Data.Properties.Add(Constants.SOURCE_POLE, sender as ListView);
 }
コード例 #11
0
ファイル: Page2.xaml.cs プロジェクト: rogeriohc/NavPaneApp1
 /// <summary>
 /// DragtemsStarting is called for D&D and reorder as the framework does not
 /// know wherer the user will drop the items. Reorder means that the target
 /// and the source ListView are the same.
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void TargetListView_DragItemsStarting(object sender, DragItemsStartingEventArgs e)
 {
     // The ListView is declared with selection mode set to Single.
     // But we want the code to be robust
     if (e.Items.Count == 1)
     {
         var items = string.Join(",", e.Items.Cast<Palestrante>().Select(i => i.nome));
         e.Data.SetText(items);
         e.Data.RequestedOperation = DataPackageOperation.Move;
         _deletedItem = null;
     }
 }
コード例 #12
0
 private void lvAssignedComponent_DragItemsStarting(object sender, DragItemsStartingEventArgs e)
 {
     lvAssignedComponent.SelectedItem = e.Items;
 }
コード例 #13
0
 private void ItemListView_DragItemsStarting(object sender, DragItemsStartingEventArgs e)
 {
     e.Data.SetData("itemIndex", storeData.Collection.IndexOf(e.Items[0] as Item).ToString());
 }
コード例 #14
0
ファイル: EditCard.xaml.cs プロジェクト: wangfowen/Recipe_Box
 private void TagView_DragItemsStarting(object sender, DragItemsStartingEventArgs e)
 {
     DraggedTag = e.Items[0].ToString();
     MainPage.DraggedItem = e.Items[0].ToString();
     //this.TitleTextBox.Text = "dragging";
 }
コード例 #15
0
ファイル: PaintPage.xaml.cs プロジェクト: IcePlus/KidsPainter
 private void DragStart(object sender, DragItemsStartingEventArgs e)
 {
     factory.DragPic = (Image)e.Items.ElementAt(0);
     factory.IsDragingPic = true;
 }
コード例 #16
0
ファイル: MainPage.xaml.cs プロジェクト: sdpatro/doc-onlook
        private void ListView_DragStarting(object sender, DragItemsStartingEventArgs e)
        {
            int itemCount = e.Items.Count;
            e.Data.SetText(itemCount.ToString());               
            List<StorageFile> fileList = new List<StorageFile>();
            foreach (FileItem fileItem in e.Items)
            {
                fileList.Add((StorageFile)fileItem);
            }
            e.Data.SetStorageItems(fileList);

            e.Data.RequestedOperation = DataPackageOperation.Copy;
            DragPanelStatus(true);
        }
コード例 #17
0
 private void lvCrew_DragItemsStarting(object sender, DragItemsStartingEventArgs e)
 {
     var items = e.Items.ToObservableCollection();
     e.Data.RequestedOperation = DataPackageOperation.Move;
     e.Data.SetDataProvider("Crew", request => request.SetData(items));
 }
コード例 #18
0
ファイル: Scenario2.xaml.cs プロジェクト: mbin/Win81App
 private void ItemGridView2_DragItemsStarting(object sender, DragItemsStartingEventArgs e)
 {
     e.Data.SetData("data", (e.Items[0] as Item).Title);
 }
コード例 #19
0
ファイル: MainPage.xaml.cs プロジェクト: muneneevans/blog
		private void UnorganizedListView_OnDragItemsStarting(object sender, DragItemsStartingEventArgs e)
		{
			var items = string.Join(",", e.Items.Cast<MyItem>().Select(i => i.Id));
			e.Data.SetText(items);
			e.Data.RequestedOperation = DataPackageOperation.Move;
		}
コード例 #20
0
 private void DragItemsStarting(object sender, DragItemsStartingEventArgs e)
 {
     Win8Client.SideBySideStrategyView.PrepareDragAndDrop(e);
     foreach (var item in e.Items)
     {
         if (!this.AllCardsListView.SelectedItems.Contains(item))
         {
             this.AllCardsListView.SelectedItems.Add(item);
         }
     }            
 }
コード例 #21
0
 private void WeightList_DragItemsStarting(object sender, DragItemsStartingEventArgs e)
 {
     Debug.WriteLine("aaa");
 }
コード例 #22
0
        private void lvSpec_DragItemsStarting(object sender, DragItemsStartingEventArgs e)
        {

        }
コード例 #23
0
 private void CurrentCardsListView_DragItemsStarting(object sender, DragItemsStartingEventArgs e)
 {
     Win8Client.SideBySideStrategyView.PrepareDragAndDrop(e);
     this.CurrentCardsListView.SelectedItems.Clear();
 }
コード例 #24
0
 //오른쪽 -> 왼쪽
 private void lvFiwpITRForms_DragItemsStarting(object sender, DragItemsStartingEventArgs e)
 {
     lvFiwpITRForms.SelectedItem = e.Items;
 }
コード例 #25
0
ファイル: MainPage.xaml.cs プロジェクト: housemeow/OurSecrets
 private void View_DragItemsStarting(object sender, DragItemsStartingEventArgs e)
 {
     DragItems = e.Items;
     bool a = (sender as GridView).Items.Contains(AddIcon);
     IsAddNewItem = true;
 }
コード例 #26
0
ファイル: Page2.xaml.cs プロジェクト: rogeriohc/NavPaneApp1
 /// <summary>
 /// DragItemsStarting is called when the Drag and Drop operation starts
 /// We take advantage of it to set the content of the DataPackage
 /// as well as indicate which operations are supported
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void SourceListView_DragItemsStarting(object sender, DragItemsStartingEventArgs e)
 {
     var items = string.Join(",", e.Items.Cast<Palestrante>().Select(i => i.nome));
     e.Data.SetText(items);
     e.Data.RequestedOperation = DataPackageOperation.Copy;
 }
コード例 #27
0
ファイル: Staff.xaml.cs プロジェクト: Zainabalhaidary/Clinic
 private async void DragMenuGridView2_DragItemsStarting(object sender, DragItemsStartingEventArgs e)
 {
     e.Data.SetData("ItemNumber2", siList2.IndexOf(e.Items[0] as StaffItem).ToString());
     //  await new MessageDialog(siList2.IndexOf(e.Items[0] as StaffItem).ToString()).ShowAsync();
 }
コード例 #28
0
 void itemView_DragItemsStarting(object sender, DragItemsStartingEventArgs e) {
     // TODO 读取正在拖动的数据对象
 }
コード例 #29
0
ファイル: Staff.xaml.cs プロジェクト: Zainabalhaidary/Clinic
 private async void DragMenuGridView_DragItemsStarting(object sender, DragItemsStartingEventArgs e)
 {
     //  e.Data.SetData("itemIndex", storeData.Collection.IndexOf(e.Items[0] as Item).ToString());
     e.Data.SetData("ItemNumber", siList.IndexOf(e.Items[0] as StaffItem).ToString());
     //await new MessageDialog(siList.IndexOf(e.Items[0] as StaffItem).ToString()).ShowAsync();
 }
コード例 #30
0
 private void TargetListView_DragItemsStarting(object sender, DragItemsStartingEventArgs e)
 {
     DDH.TargetListView_DragItemsStarting(sender, e);
 }
コード例 #31
0
 private void GridViewEx_DragItemsStarting(object sender, DragItemsStartingEventArgs e)
 {
     // highlight dragging item
     ChangeItemHighlightingStatus(e.Items[0]);
 }