Exemple #1
0
 /// <summary>
 /// Sets the captions when dragging a location item over another location item
 /// </summary>
 /// <param name="senderLocationItem">The location item which fired the DragOver event</param>
 /// <param name="sourceLocationItem">The source location item</param>
 /// <param name="e">DragEvent args</param>
 private void NavigationViewLocationItem_DragOver_SetCaptions(LocationItem senderLocationItem, LocationItem sourceLocationItem, DragEventArgs e)
 {
     // If the location item is the same as the original dragged item or the default location (home button), the dragging should be disabled
     if (sourceLocationItem.Equals(senderLocationItem) || senderLocationItem.IsDefaultLocation == true)
     {
         e.AcceptedOperation = Windows.ApplicationModel.DataTransfer.DataPackageOperation.None;
         e.DragUIOverride.IsCaptionVisible = false;
     }
     else
     {
         e.AcceptedOperation = Windows.ApplicationModel.DataTransfer.DataPackageOperation.Move;
         e.DragUIOverride.IsCaptionVisible = true;
         e.DragUIOverride.Caption          = "PinToSidebarByDraggingCaptionText".GetLocalized();
     }
 }
Exemple #2
0
 /// <summary>
 /// Sets the captions when dragging a location item over another location item
 /// </summary>
 /// <param name="senderLocationItem">The location item which fired the DragOver event</param>
 /// <param name="sourceLocationItem">The source location item</param>
 /// <param name="e">DragEvent args</param>
 private void NavigationViewLocationItem_DragOver_SetCaptions(LocationItem senderLocationItem, LocationItem sourceLocationItem, DragEventArgs e)
 {
     // If the location item is the same as the original dragged item
     if (sourceLocationItem.Equals(senderLocationItem))
     {
         e.AcceptedOperation = DataPackageOperation.None;
         e.DragUIOverride.IsCaptionVisible = false;
     }
     else
     {
         e.AcceptedOperation = DataPackageOperation.Move;
         e.DragUIOverride.IsCaptionVisible = true;
         e.DragUIOverride.Caption          = "PinToSidebarByDraggingCaptionText".GetLocalized();
     }
 }