Skip to content

Commit f574f1b

Browse files
Luke BlevinsLuke Blevins
authored andcommitted
Migrate Target SDK Version to 1809
1 parent 6d5e954 commit f574f1b

13 files changed

+569
-223
lines changed

App.xaml

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,37 @@
44
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
55
xmlns:local="using:Files"
66
xmlns:pages="using:Files.SettingsPages">
7-
7+
<Application.Resources>
8+
<ResourceDictionary>
9+
<ResourceDictionary.ThemeDictionaries>
10+
<ResourceDictionary x:Key="Light">
11+
<!-- The "Default" theme dictionary is used unless a specific
12+
light, dark, or high contrast dictionary is provided. These
13+
resources should be tested with both the light and dark themes,
14+
and specific light or dark resources provided as needed. -->
15+
<AcrylicBrush x:Key="NavigationViewDefaultPaneBackground"
16+
BackgroundSource="Backdrop"
17+
TintColor="LightSlateGray"
18+
TintOpacity="0.6"/>
19+
<AcrylicBrush x:Key="NavigationViewTopPaneBackground"
20+
BackgroundSource="Backdrop"
21+
TintColor="{ThemeResource SystemAccentColor}"
22+
TintOpacity="0.6"/>
23+
<AcrylicBrush x:Key="NavigationViewExpandedPaneBackground" BackgroundSource="HostBackdrop" TintOpacity="0.6" TintColor="White" FallbackColor="{StaticResource SystemChromeHighColor}"/>
24+
</ResourceDictionary>
25+
<ResourceDictionary x:Key="Dark">
26+
<AcrylicBrush x:Key="NavigationViewExpandedPaneBackground" BackgroundSource="HostBackdrop" TintOpacity="0.6" TintColor="Black" FallbackColor="#FF494949"/>
27+
</ResourceDictionary>
28+
<ResourceDictionary x:Key="HighContrast">
29+
<!-- Always include a "HighContrast" dictionary when you override
30+
theme resources. This empty dictionary ensures that the
31+
default high contrast resources are used when the user
32+
turns on high contrast mode. -->
33+
</ResourceDictionary>
34+
</ResourceDictionary.ThemeDictionaries>
35+
</ResourceDictionary>
36+
37+
38+
</Application.Resources>
839

940
</Application>

Files.csproj

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<AssemblyName>Files</AssemblyName>
1212
<DefaultLanguage>en-US</DefaultLanguage>
1313
<TargetPlatformIdentifier>UAP</TargetPlatformIdentifier>
14-
<TargetPlatformVersion Condition=" '$(TargetPlatformVersion)' == '' ">10.0.17134.0</TargetPlatformVersion>
14+
<TargetPlatformVersion Condition=" '$(TargetPlatformVersion)' == '' ">10.0.17763.0</TargetPlatformVersion>
1515
<TargetPlatformMinVersion>10.0.17134.0</TargetPlatformMinVersion>
1616
<MinimumVisualStudioVersion>14</MinimumVisualStudioVersion>
1717
<FileAlignment>512</FileAlignment>
@@ -83,6 +83,8 @@
8383
<UseVSHostingProcess>false</UseVSHostingProcess>
8484
<ErrorReport>prompt</ErrorReport>
8585
<Prefer32Bit>true</Prefer32Bit>
86+
<UseDotNetNativeToolchain>false</UseDotNetNativeToolchain>
87+
<Optimize>false</Optimize>
8688
</PropertyGroup>
8789
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
8890
<OutputPath>bin\x64\Release\</OutputPath>
@@ -111,6 +113,7 @@
111113
<DependentUpon>GenericFileBrowser.xaml</DependentUpon>
112114
</Compile>
113115
<Compile Include="ItemInteractions.cs" />
116+
<Compile Include="LocationsList.cs" />
114117
<Compile Include="MainPage.xaml.cs">
115118
<DependentUpon>MainPage.xaml</DependentUpon>
116119
</Compile>
@@ -244,28 +247,25 @@
244247
</ItemGroup>
245248
<ItemGroup>
246249
<PackageReference Include="Microsoft.NETCore.UniversalWindowsPlatform">
247-
<Version>6.2.0-preview1-26926-04</Version>
250+
<Version>6.1.9</Version>
248251
</PackageReference>
249252
<PackageReference Include="Microsoft.Toolkit.Uwp">
250-
<Version>5.0.0-preview.gb86cb1c4cb</Version>
253+
<Version>5.0.0</Version>
251254
</PackageReference>
252255
<PackageReference Include="Microsoft.Toolkit.Uwp.DeveloperTools">
253-
<Version>5.0.0-preview.gb86cb1c4cb</Version>
256+
<Version>5.0.0</Version>
254257
</PackageReference>
255258
<PackageReference Include="Microsoft.Toolkit.Uwp.UI">
256-
<Version>5.0.0-preview.gb86cb1c4cb</Version>
259+
<Version>5.0.0</Version>
257260
</PackageReference>
258261
<PackageReference Include="Microsoft.Toolkit.Uwp.UI.Animations">
259-
<Version>5.0.0-preview.gb86cb1c4cb</Version>
262+
<Version>5.0.0</Version>
260263
</PackageReference>
261264
<PackageReference Include="Microsoft.Toolkit.Uwp.UI.Controls">
262-
<Version>5.0.0-preview.gb86cb1c4cb</Version>
265+
<Version>5.0.0</Version>
263266
</PackageReference>
264267
<PackageReference Include="Microsoft.Toolkit.Uwp.UI.Controls.DataGrid">
265-
<Version>5.0.0-preview.gb86cb1c4cb</Version>
266-
</PackageReference>
267-
<PackageReference Include="Microsoft.Xaml.Behaviors.Uwp.Managed">
268-
<Version>2.0.0</Version>
268+
<Version>5.0.0</Version>
269269
</PackageReference>
270270
</ItemGroup>
271271
<ItemGroup>

GenericFileBrowser.xaml

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@
120120

121121
<Grid HorizontalAlignment="Stretch" Margin="0,0,0,0" VerticalAlignment="Stretch" Grid.Row="1">
122122

123-
<controls:DataGrid FocusVisualPrimaryThickness="0" SelectionMode="Extended" IsDoubleTapEnabled="True" x:FieldModifier="public" x:Name="AllView" Drop="AllView_DropAsync" AutoGenerateColumns="False" CanDrag="False" AllowDrop="True" DragOver="AllView_DragOver" IsRightTapEnabled="True" CanUserReorderColumns="False" IsReadOnly="True" ItemsSource="{x:Bind local2:ItemViewModel.FilesAndFolders}" Margin="0,0,0,0" Padding="0, 0, 0, 0" HorizontalAlignment="Left">
123+
<controls:DataGrid CellEditEnded="AllView_CellEditEnded" FocusVisualPrimaryThickness="0" SelectionMode="Extended" IsDoubleTapEnabled="True" x:FieldModifier="public" x:Name="AllView" Drop="AllView_DropAsync" AutoGenerateColumns="False" CanDrag="False" AllowDrop="True" DragOver="AllView_DragOver" IsRightTapEnabled="True" CanUserReorderColumns="False" IsReadOnly="False" ItemsSource="{x:Bind local2:ItemViewModel.FilesAndFolders}" Margin="0,0,0,0" Padding="0, 0, 0, 0" HorizontalAlignment="Left">
124124

125125
<controls:DataGrid.Resources>
126126
<MenuFlyout x:Name="HeaderRightClickMenu" x:Key="HeaderRightClickFlyout">
@@ -184,10 +184,16 @@
184184
</MenuFlyout>
185185
</controls:DataGrid.Resources>
186186

187-
187+
<controls:DataGrid.CellStyle>
188+
<Style TargetType="controls:DataGridCell">
189+
<Setter Property="BorderThickness" Value="0"/>
190+
<Setter Property="FocusVisualPrimaryThickness" Value="0"/>
191+
<Setter Property="FocusVisualSecondaryThickness" Value="0"/>
192+
</Style>
193+
</controls:DataGrid.CellStyle>
188194

189195
<controls:DataGrid.Columns>
190-
<controls:DataGridTemplateColumn>
196+
<controls:DataGridTemplateColumn IsReadOnly="True">
191197
<controls:DataGridTemplateColumn.CellTemplate>
192198
<DataTemplate>
193199
<Grid Margin="15, 0, 0, 0">
@@ -197,10 +203,10 @@
197203
</DataTemplate>
198204
</controls:DataGridTemplateColumn.CellTemplate>
199205
</controls:DataGridTemplateColumn>
200-
<controls:DataGridTextColumn Header="Name" Width="385" Binding="{Binding FileName}" Tag="Name"/>
201-
<controls:DataGridTextColumn Header="Date modified" Width="300" Binding="{Binding FileDate}" Tag="Date"/>
202-
<controls:DataGridTextColumn Header="Type" Width="150" Binding="{Binding FileExtension}" Tag="Type"/>
203-
<controls:DataGridTextColumn Header="Size" Binding="{Binding FileSize}" Tag="Size"/>
206+
<controls:DataGridTextColumn Header="Name" Width="385" Binding="{Binding FileName}" Tag="Name"/>
207+
<controls:DataGridTextColumn IsReadOnly="True" Header="Date modified" Width="300" Binding="{Binding FileDate}" Tag="Date"/>
208+
<controls:DataGridTextColumn IsReadOnly="True" Header="Type" Width="150" Binding="{Binding FileExtension}" Tag="Type"/>
209+
<controls:DataGridTextColumn IsReadOnly="True" Header="Size" Binding="{Binding FileSize}" Tag="Size"/>
204210
</controls:DataGrid.Columns>
205211

206212
</controls:DataGrid>
@@ -212,8 +218,8 @@
212218

213219
</Grid>
214220

215-
<controls:DropShadowPanel BorderBrush="White" BorderThickness="1" Name="FileConflictBox" Visibility="{x:Bind local2:ItemViewModel.ConflictUIVisibility.isVisible}" HorizontalAlignment="Center" VerticalAlignment="Top" Width="500" Height="225" Margin="0,150,0,0" Grid.Row="1" Canvas.ZIndex="3">
216-
<Grid Padding="25">
221+
<controls:DropShadowPanel BorderBrush="White" BorderThickness="1" Name="FileConflictBox" Visibility="{x:Bind local2:ItemViewModel.ConflictUIVisibility.isVisible, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" HorizontalAlignment="Center" VerticalAlignment="Top" Width="500" Height="225" Margin="0,150,0,0" Grid.Row="1" Canvas.ZIndex="3">
222+
<Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}" Padding="25">
217223
<Rectangle Fill="{ThemeResource ApplicationPageBackgroundThemeBrush}" Stroke="White" StrokeThickness="1" Width="500" Height="225" HorizontalAlignment="Center" VerticalAlignment="Center"/>
218224
<StackPanel>
219225
<TextBlock Name="ConflictLargeHeader" Text="{x:Bind local2:ItemViewModel.ConflictBoxHeader.Header, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" FontSize="22"/>
@@ -227,7 +233,7 @@
227233
</controls:DropShadowPanel>
228234

229235
<controls:DropShadowPanel BorderBrush="White" BorderThickness="1" Name="CollisionBox" Visibility="{x:Bind local2:ItemViewModel.CollisionUIVisibility.isVisible, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" HorizontalAlignment="Center" VerticalAlignment="Top" Width="500" Height="275" Margin="0,150,0,0" Grid.Row="1" Canvas.ZIndex="3">
230-
<Grid Padding="25">
236+
<Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}" Padding="25">
231237
<Rectangle Fill="{ThemeResource ApplicationPageBackgroundThemeBrush}" Stroke="White" StrokeThickness="1" Width="500" Height="275" HorizontalAlignment="Center" VerticalAlignment="Center"/>
232238
<StackPanel>
233239
<TextBlock Name="LargeHeader" Text="{x:Bind local2:ItemViewModel.CollisionBoxHeader.Header, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" FontSize="22"/>

GenericFileBrowser.xaml.cs

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -94,20 +94,16 @@ private void Clipboard_ContentChanged(object sender, object e)
9494
public static UniversalPath p = new UniversalPath();
9595
public static UniversalPath P { get { return GenericFileBrowser.p; } }
9696

97-
public static GenericFileBrowser getGenericFileBrowser = new GenericFileBrowser();
98-
public static GenericFileBrowser GetGenericFileBrowser { get { return getGenericFileBrowser; } }
99-
100-
public static void UpdateAllBindings()
101-
{
102-
GetGenericFileBrowser.Bindings.Update();
103-
}
97+
//private static GenericFileBrowser getGenericFileBrowser = new GenericFileBrowser();
98+
//public static GenericFileBrowser GetGenericFileBrowser { get { return getGenericFileBrowser; } }
10499

100+
105101
protected override void OnNavigatedTo(NavigationEventArgs eventArgs)
106102
{
107103
base.OnNavigatedTo(eventArgs);
108104
var parameters = (string)eventArgs.Parameter;
109105
ItemViewModel.FilesAndFolders.Clear();
110-
ItemViewModel.ViewModel = new ItemViewModel(parameters, this.GenericItemView);
106+
ItemViewModel.ViewModel = new ItemViewModel(parameters, GFBPageName);
111107
if (parameters.Equals(Environment.GetFolderPath(Environment.SpecialFolder.DesktopDirectory)))
112108
{
113109
P.path = "Desktop";
@@ -175,6 +171,22 @@ private void Button_Click(object sender, RoutedEventArgs e)
175171
ProgressBox.Visibility = Visibility.Collapsed;
176172
}
177173

174+
private async void AllView_CellEditEnded(object sender, DataGridCellEditEndedEventArgs e)
175+
{
176+
//var NewCellText = (e.Column.GetCellContent(e.Row) as TextBlock).Text.ToString();
177+
var NewCellText = (GenericFileBrowser.data.SelectedItem as ListedItem).FileName;
178+
var SelectedItem = ItemViewModel.FilesAndFolders[e.Row.GetIndex()];
179+
if(SelectedItem.FileExtension == "Folder")
180+
{
181+
StorageFolder FolderToRename = await StorageFolder.GetFolderFromPathAsync(SelectedItem.FilePath);
182+
await FolderToRename.RenameAsync(NewCellText);
183+
}
184+
else
185+
{
186+
StorageFile FileToRename = await StorageFile.GetFileFromPathAsync(SelectedItem.FilePath);
187+
await FileToRename.RenameAsync(NewCellText);
188+
}
189+
}
178190
}
179191

180192
public class EmptyFolderTextState : INotifyPropertyChanged

0 commit comments

Comments
 (0)