Skip to content

Commit bef2df5

Browse files
committed
Improved Paste Reliability
1 parent e5010b9 commit bef2df5

File tree

6 files changed

+24
-2
lines changed

6 files changed

+24
-2
lines changed

Files UWP/App.xaml.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
using System.Threading;
55
using Windows.ApplicationModel;
66
using Windows.ApplicationModel.Activation;
7+
using Windows.ApplicationModel.DataTransfer;
78
using Windows.Storage;
89
using Windows.UI;
910
using Windows.UI.Xaml;
@@ -58,6 +59,7 @@ public App()
5859
this.RequestedTheme = SettingsPages.Personalization.TV.ThemeValue;
5960
Debug.WriteLine("!!Requested Theme!!" + RequestedTheme.ToString());
6061

62+
6163

6264
}
6365
public static Filesystem.ItemViewModel ViewModel = new Filesystem.ItemViewModel();

Files UWP/GenericFileBrowser.xaml.cs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,15 @@ protected override void OnNavigatedTo(NavigationEventArgs eventArgs)
149149
data.Columns[0].GetCellContent(dataGridRow).Opacity = 1;
150150
}
151151
}
152+
153+
if (Clipboard.GetContent().Contains(StandardDataFormats.StorageItems))
154+
{
155+
Interaction.PS.isEnabled = true;
156+
}
157+
else
158+
{
159+
Interaction.PS.isEnabled = false;
160+
}
152161
}
153162

154163

Files UWP/PhotoAlbum.xaml.cs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,14 @@ protected override void OnNavigatedTo(NavigationEventArgs eventArgs)
9696
App.PathText.Text = parameters;
9797
}
9898

99-
99+
if (Clipboard.GetContent().Contains(StandardDataFormats.StorageItems))
100+
{
101+
Interaction.PS.isEnabled = true;
102+
}
103+
else
104+
{
105+
Interaction.PS.isEnabled = false;
106+
}
100107
}
101108

102109
private void Clipboard_ContentChanged(object sender, object e)

Files UWP/ProHome.xaml.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ public sealed partial class ProHome : Page
3434
public static Frame accessibleContentFrame;
3535
public static Button BackButton;
3636
public static Button ForwardButton;
37+
public static Button accessiblePasteButton;
3738
public static Button RefreshButton;
3839
public static Button AddItemButton;
3940
public static ContentDialog AddItemBox;
@@ -70,6 +71,7 @@ public ProHome()
7071
ForwardButton = Forward;
7172
RefreshButton = Refresh;
7273
AddItemButton = addItemButton;
74+
accessiblePasteButton = PasteButton;
7375
LocationsList.SelectedIndex = 0;
7476
if (App.Current.RequestedTheme == ApplicationTheme.Dark)
7577
{

Files UWP/Properties.xaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<RowDefinition Height="85*"/>
1616
</Grid.RowDefinitions>
1717

18-
<Custom:TabView Background="White" CanCloseTabs="False" TabWidthBehavior="Equal" Grid.Row="0">
18+
<Custom:TabView Background="{ThemeResource ApplicationPageBackgroundThemeBrush}" CanCloseTabs="False" TabWidthBehavior="Equal" Grid.Row="0">
1919
<Custom:TabViewItem Background="White" Header="Info">
2020
<Custom:TabViewItem.Icon>
2121
<FontIcon Glyph="&#xE946;"/>

Files UWP/YourHome.xaml.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ public YourHome()
3737
recentItemsCollection.Clear();
3838
PopulateRecentsList();
3939
App.PathText.Text = "Favorites";
40+
4041
}
4142

4243
protected override void OnNavigatedTo(NavigationEventArgs eventArgs)
@@ -45,6 +46,7 @@ protected override void OnNavigatedTo(NavigationEventArgs eventArgs)
4546
ProHome.BackButton.IsEnabled = ProHome.accessibleContentFrame.CanGoBack;
4647
ProHome.ForwardButton.IsEnabled = ProHome.accessibleContentFrame.CanGoForward;
4748
ProHome.RS.isEnabled = false;
49+
ProHome.accessiblePasteButton.IsEnabled = false;
4850
App.AlwaysPresentCommands.isEnabled = false;
4951
}
5052

0 commit comments

Comments
 (0)