@@ -899,6 +899,7 @@ public async void RenameItem_Click(object sender, RoutedEventArgs e)
899
899
900
900
901
901
public List < DataGridRow > dataGridRows = new List < DataGridRow > ( ) ;
902
+ public List < GridViewItem > gridViewItems = new List < GridViewItem > ( ) ;
902
903
public async void CutItem_Click ( object sender , RoutedEventArgs e )
903
904
{
904
905
DataPackage dataPackage = new DataPackage ( ) ;
@@ -928,11 +929,10 @@ public async void CutItem_Click(object sender, RoutedEventArgs e)
928
929
{
929
930
if ( dataGridRow . GetIndex ( ) == StorItem . RowIndex )
930
931
{
931
- Debug . WriteLine ( dataGridRow . GetIndex ( ) ) ;
932
932
( CurrentInstance . accessibleContentFrame . Content as GenericFileBrowser ) . data . Columns [ 0 ] . GetCellContent ( dataGridRow ) . Opacity = 0.4 ;
933
933
}
934
934
}
935
- var RowPressed = FindParent < DataGridRow > ( ( CurrentInstance . accessibleContentFrame . Content as GenericFileBrowser ) . data as DependencyObject ) ;
935
+
936
936
App . pathsToDeleteAfterPaste . Add ( StorItem . FilePath ) ;
937
937
if ( StorItem . FileType != "Folder" )
938
938
{
@@ -950,11 +950,37 @@ public async void CutItem_Click(object sender, RoutedEventArgs e)
950
950
else if ( typeof ( PageType ) == typeof ( PhotoAlbum ) )
951
951
{
952
952
var CurrentInstance = ItemViewModel < PhotoAlbum > . GetCurrentSelectedTabInstance < ProHome > ( ) ;
953
-
954
953
if ( ( CurrentInstance . accessibleContentFrame . Content as PhotoAlbum ) . gv . SelectedItems . Count != 0 )
955
954
{
955
+
956
+ gridViewItems . Clear ( ) ;
957
+ FindChildren < GridViewItem > ( gridViewItems , ( CurrentInstance . accessibleContentFrame . Content as PhotoAlbum ) . PAPageName . Content ) ;
958
+
959
+ // First, reset GridView items that may be in "cut" command mode
960
+ foreach ( GridViewItem gridViewItem in gridViewItems )
961
+ {
962
+ List < Grid > itemContentGrids = new List < Grid > ( ) ;
963
+ FindChildren < Grid > ( itemContentGrids , ( CurrentInstance . accessibleContentFrame . Content as PhotoAlbum ) . gv . ContainerFromItem ( gridViewItem . Content ) ) ;
964
+ var imageOfItem = itemContentGrids . Find ( x => x . Tag . ToString ( ) == "ItemImage" ) ;
965
+ if ( imageOfItem . Opacity < 1 )
966
+ {
967
+ imageOfItem . Opacity = 1 ;
968
+ }
969
+ }
970
+
956
971
foreach ( ListedItem StorItem in ( type as PhotoAlbum ) . gv . SelectedItems )
957
972
{
973
+ foreach ( GridViewItem itemToDimForCut in gridViewItems )
974
+ {
975
+ if ( ( CurrentInstance . accessibleContentFrame . Content as PhotoAlbum ) . gv . Items . IndexOf ( itemToDimForCut . Content ) == StorItem . RowIndex )
976
+ {
977
+ List < Grid > itemContentGrids = new List < Grid > ( ) ;
978
+ FindChildren < Grid > ( itemContentGrids , ( CurrentInstance . accessibleContentFrame . Content as PhotoAlbum ) . gv . ContainerFromItem ( itemToDimForCut . Content ) ) ;
979
+ var imageOfItem = itemContentGrids . Find ( x => x . Tag . ToString ( ) == "ItemImage" ) ;
980
+ imageOfItem . Opacity = 0.4 ;
981
+ }
982
+ }
983
+
958
984
App . pathsToDeleteAfterPaste . Add ( StorItem . FilePath ) ;
959
985
if ( StorItem . FileType != "Folder" )
960
986
{
0 commit comments