Skip to content

Commit cfad032

Browse files
Luke BlevinsLuke Blevins
authored andcommitted
Initial Context Menu Support for PhotoAlbumView
1 parent 7cd214a commit cfad032

12 files changed

+330
-182
lines changed

Assets/FilesDrive.PNG

-276 KB
Loading

Assets/FilesHome.PNG

-644 KB
Loading

Assets/screenshot.png

-55 KB
Binary file not shown.

FileLoader.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
using Windows.UI.Xaml.Media.Imaging;
2424
using Windows.Storage.Search;
2525
using Windows.UI.Popups;
26-
using Interact;
26+
using Interacts;
2727
using Windows.UI.Xaml.Controls;
2828

2929
namespace ItemListPresenter
@@ -197,7 +197,7 @@ private async void DisplayConsentDialog()
197197
public static CollisionUIVisibility ConflictUIVisibility { get { return conflictUIVisibility; } }
198198

199199
private static EmptyFolderTextState textState = new EmptyFolderTextState();
200-
public static EmptyFolderTextState TextState { get { return ItemViewModel.textState; } }
200+
public static EmptyFolderTextState TextState { get { return textState; } }
201201
public static bool IsStopRequested = false;
202202
public static bool IsTerminated = true;
203203

@@ -227,7 +227,7 @@ public async void GetItemsAsync(string path)
227227

228228
PUIH.Header = "Loading " + NumOfItems + " items";
229229
ButtonText.buttonText = "Hide";
230-
230+
231231
if (NumOfItems >= 250)
232232
{
233233
PVIS.isVisible = Visibility.Visible;
@@ -313,7 +313,7 @@ public async void GetItemsAsync(string path)
313313
PVIS.isVisible = Visibility.Collapsed;
314314
IsTerminated = true;
315315
}
316-
catch (UnauthorizedAccessException e)
316+
catch (UnauthorizedAccessException)
317317
{
318318
DisplayConsentDialog();
319319
}

Files.csproj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,12 +151,13 @@
151151
<Content Include="Assets\Cards\Gradients\Orange.png" />
152152
<Content Include="Assets\Cards\Gradients\Pink.png" />
153153
<Content Include="Assets\Cards\Gradients\Red.png" />
154+
<Content Include="Assets\FilesDrive.PNG" />
155+
<Content Include="Assets\FilesHome.PNG" />
154156
<Content Include="Assets\LargeTile.scale-100.png" />
155157
<Content Include="Assets\LargeTile.scale-125.png" />
156158
<Content Include="Assets\LargeTile.scale-150.png" />
157159
<Content Include="Assets\LargeTile.scale-200.png" />
158160
<Content Include="Assets\LargeTile.scale-400.png" />
159-
<Content Include="Assets\screenshot.png" />
160161
<Content Include="Assets\SmallTile.scale-100.png" />
161162
<Content Include="Assets\SmallTile.scale-125.png" />
162163
<Content Include="Assets\SmallTile.scale-150.png" />

GenericFileBrowser.xaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
xmlns:local="using:Files"
2222
xmlns:local1="using:Navigation"
2323
xmlns:local2="using:ItemListPresenter"
24-
xmlns:local3="using:Interact"
24+
xmlns:local3="using:Interacts"
2525
Name="GenericItemView"
2626
mc:Ignorable="d" ScrollViewer.HorizontalScrollBarVisibility="Hidden" ScrollViewer.VerticalScrollBarVisibility="Auto">
2727

GenericFileBrowser.xaml.cs

Lines changed: 16 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,10 @@ public GenericFileBrowser()
4343
this.InitializeComponent();
4444
GFBPageName = GenericItemView;
4545
string env = Environment.ExpandEnvironmentVariables("%userprofile%");
46-
47-
this.IsTextScaleFactorEnabled = true;
4846
var CoreTitleBar = CoreApplication.GetCurrentView().TitleBar;
4947
CoreTitleBar.ExtendViewIntoTitleBar = true;
5048
var titleBar = ApplicationView.GetForCurrentView().TitleBar;
51-
titleBar.ButtonBackgroundColor = Color.FromArgb(100, 255, 255, 255);
49+
//titleBar.ButtonBackgroundColor = Color.FromArgb(100, 255, 255, 255);
5250
titleBar.ButtonHoverBackgroundColor = Color.FromArgb(75, 10, 10, 10);
5351
titleBar.ButtonHoverBackgroundColor = Color.FromArgb(75, 10, 10, 10);
5452
ProgressBox.Visibility = Visibility.Collapsed;
@@ -59,35 +57,35 @@ public GenericFileBrowser()
5957
data = AllView;
6058
context = RightClickContextMenu;
6159
HeaderContextMenu = HeaderRightClickMenu;
62-
Interact.Interaction.page = this;
63-
OpenItem.Click += Interact.Interaction.OpenItem_Click;
64-
ShareItem.Click += Interact.Interaction.ShareItem_Click;
65-
DeleteItem.Click += Interact.Interaction.DeleteItem_Click;
66-
RenameItem.Click += Interact.Interaction.RenameItem_Click;
67-
CutItem.Click += Interact.Interaction.CutItem_Click;
68-
CopyItem.Click += Interact.Interaction.CopyItem_ClickAsync;
69-
AllView.RightTapped += Interact.Interaction.AllView_RightTapped;
60+
Interacts.Interaction.page = this;
61+
OpenItem.Click += Interacts.Interaction.OpenItem_Click;
62+
ShareItem.Click += Interacts.Interaction.ShareItem_Click;
63+
DeleteItem.Click += Interacts.Interaction.DeleteItem_Click;
64+
RenameItem.Click += Interacts.Interaction.RenameItem_Click;
65+
CutItem.Click += Interacts.Interaction.CutItem_Click;
66+
CopyItem.Click += Interacts.Interaction.CopyItem_ClickAsync;
67+
AllView.RightTapped += Interacts.Interaction.AllView_RightTapped;
7068
Back.Click += Navigation.NavigationActions.Back_Click;
7169
Forward.Click += Navigation.NavigationActions.Forward_Click;
7270
Refresh.Click += Navigation.NavigationActions.Refresh_Click;
73-
AllView.DoubleTapped += Interact.Interaction.List_ItemClick;
74-
Paste.Click += Interact.Interaction.PasteItem_ClickAsync;
71+
AllView.DoubleTapped += Interacts.Interaction.List_ItemClick;
72+
Paste.Click += Interacts.Interaction.PasteItem_ClickAsync;
7573
Clipboard.ContentChanged += Clipboard_ContentChanged;
76-
CollisonLV.ItemClick += Interact.Interaction.CollisionLVItemClick;
77-
ReplaceChoice.Click += Interact.Interaction.ReplaceChoiceClick;
78-
SkipChoice.Click += Interact.Interaction.SkipChoiceClick;
74+
CollisonLV.ItemClick += Interacts.Interaction.CollisionLVItemClick;
75+
ReplaceChoice.Click += Interacts.Interaction.ReplaceChoiceClick;
76+
SkipChoice.Click += Interacts.Interaction.SkipChoiceClick;
7977
}
8078

8179
private void Clipboard_ContentChanged(object sender, object e)
8280
{
8381
DataPackageView packageView = Clipboard.GetContent();
8482
if (packageView.Contains(StandardDataFormats.StorageItems))
8583
{
86-
Interact.Interaction.PS.isEnabled = true;
84+
Interacts.Interaction.PS.isEnabled = true;
8785
}
8886
else
8987
{
90-
Interact.Interaction.PS.isEnabled = false;
88+
Interacts.Interaction.PS.isEnabled = false;
9189
}
9290
}
9391

0 commit comments

Comments
 (0)