Skip to content

Commit 612c716

Browse files
committed
Fix PathBox Edit Mode not Loading
1 parent 41e5cdc commit 612c716

File tree

4 files changed

+51
-9
lines changed

4 files changed

+51
-9
lines changed

Files.Package/Files.Package.wapproj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
<GenerateTestArtifacts>True</GenerateTestArtifacts>
6060
<HoursBetweenUpdateChecks>0</HoursBetweenUpdateChecks>
6161
<EntryPointProjectUniqueName>..\Files\Files.csproj</EntryPointProjectUniqueName>
62-
<PackageCertificateThumbprint>4BCB7C3E4C2C60760763F4E78EDEC8AA61CF3209</PackageCertificateThumbprint>
62+
<PackageCertificateThumbprint>A39FADAB27AA0D6B900C9AFEF1543130F695B0F6</PackageCertificateThumbprint>
6363
</PropertyGroup>
6464
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x86'">
6565
<AppxBundle>Always</AppxBundle>
@@ -153,6 +153,7 @@
153153
<Content Include="Assets\WSL\kali.svg" />
154154
<Content Include="Assets\WSL\opensuse.svg" />
155155
<Content Include="Assets\WSL\ubuntu.svg" />
156+
<None Include="Files.Package_TemporaryKey.pfx" />
156157
<None Include="FilesUwp.Package_StoreKey.pfx" />
157158
<None Include="Package.StoreAssociation.xml" />
158159
<None Include="FilesUwp.Package_TemporaryKey.pfx" />

Files.Package/Package.appxmanifest

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Package xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10" xmlns:mp="http://schemas.microsoft.com/appx/2014/phone/manifest" xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10" xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities" xmlns:desktop4="http://schemas.microsoft.com/appx/manifest/desktop/windows10/4" xmlns:desktop="http://schemas.microsoft.com/appx/manifest/desktop/windows10" xmlns:uap5="http://schemas.microsoft.com/appx/manifest/uap/windows10/5" IgnorableNamespaces="uap uap5 mp rescap desktop4 desktop">
3-
<Identity Name="49306atecsolution.FilesUWP" Publisher="CN=53EC4384-7F5B-4CF6-8C23-513FFE9D1AB7" Version="0.7.0.0" />
3+
<Identity Name="49306atecsolution.FilesUWP" Publisher="CN=Luke Blevins" Version="0.7.0.0" />
44
<Properties>
55
<DisplayName>Files UWP - Preview</DisplayName>
66
<PublisherDisplayName>Yair A</PublisherDisplayName>

Files/UserControls/NavigationToolbar/NavigationToolbar.xaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -515,7 +515,7 @@
515515
ScrollViewer.HorizontalScrollBarVisibility="Auto"
516516
ScrollViewer.VerticalScrollBarVisibility="Hidden"
517517
Text="{x:Bind PathText, Mode=OneWay}"
518-
Visibility="Collapsed" />
518+
/>
519519

520520
<Grid
521521
x:Name="ClickablePath"

Files/UserControls/NavigationToolbar/NavigationToolbar.xaml.cs

Lines changed: 47 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,10 @@
44
using System;
55
using System.Collections.Generic;
66
using System.Collections.ObjectModel;
7+
using System.ComponentModel;
78
using System.IO;
89
using System.Linq;
10+
using System.Runtime.CompilerServices;
911
using System.Runtime.InteropServices.WindowsRuntime;
1012
using Windows.Foundation;
1113
using Windows.Foundation.Collections;
@@ -24,10 +26,42 @@
2426

2527
namespace Files.UserControls
2628
{
27-
public sealed partial class NavigationToolbar : UserControl, INavigationToolbar
29+
public sealed partial class NavigationToolbar : UserControl, INavigationToolbar, INotifyPropertyChanged
2830
{
29-
private bool ManualEntryBoxLoaded { get; set; } = false;
30-
private bool ClickablePathLoaded { get; set; } = true;
31+
private bool manualEntryBoxLoaded = false;
32+
private bool ManualEntryBoxLoaded
33+
{
34+
get
35+
{
36+
return manualEntryBoxLoaded;
37+
}
38+
set
39+
{
40+
if(value != manualEntryBoxLoaded)
41+
{
42+
manualEntryBoxLoaded = value;
43+
NotifyPropertyChanged("ManualEntryBoxLoaded");
44+
}
45+
}
46+
}
47+
48+
private bool clickablePathLoaded = true;
49+
private bool ClickablePathLoaded
50+
{
51+
get
52+
{
53+
return clickablePathLoaded;
54+
}
55+
set
56+
{
57+
if(value != clickablePathLoaded)
58+
{
59+
clickablePathLoaded = value;
60+
NotifyPropertyChanged("ClickablePathLoaded");
61+
}
62+
}
63+
}
64+
3165
private bool SearchBoxLoaded { get; set; }
3266
private string PathText { get; set; }
3367

@@ -72,7 +106,7 @@ bool INavigationToolbar.IsEditModeEnabled
72106
{
73107
get
74108
{
75-
return VisiblePath.IsLoaded;
109+
return ManualEntryBoxLoaded;
76110
}
77111
set
78112
{
@@ -142,15 +176,22 @@ string INavigationToolbar.PathControlDisplayText
142176
set
143177
{
144178
PathText = value;
179+
NotifyPropertyChanged("PathText");
145180
}
146181
}
147182
private ObservableCollection<PathBoxItem> pathComponents = new ObservableCollection<PathBoxItem>();
183+
184+
public event PropertyChangedEventHandler PropertyChanged;
185+
private void NotifyPropertyChanged([CallerMemberName] string propertyName = "")
186+
{
187+
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
188+
}
189+
148190
ObservableCollection<PathBoxItem> INavigationToolbar.PathComponents => pathComponents;
149191

150192
private void ManualPathEntryItem_Click(object sender, RoutedEventArgs e)
151193
{
152-
VisiblePath.Visibility = Visibility.Visible;
153-
ClickablePath.Visibility = Visibility.Collapsed;
194+
(this as INavigationToolbar).IsEditModeEnabled = true;
154195
VisiblePath.Focus(FocusState.Programmatic);
155196
VisiblePath.SelectAll();
156197
}

0 commit comments

Comments
 (0)