Skip to content

Commit 8c7cf03

Browse files
committed
wasdk 1.6 and dependency upgrade
1 parent 8bd1ff9 commit 8c7cf03

File tree

122 files changed

+2046
-429
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

122 files changed

+2046
-429
lines changed

Directory.Build.props

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<!-- Copyright (c) Files Community. Licensed under the MIT License. -->
2+
<Project>
3+
<PropertyGroup>
4+
<TargetFrameworkVersion>net9.0</TargetFrameworkVersion>
5+
<TargetWindowsVersion>10.0.22621.0</TargetWindowsVersion>
6+
<MinimalWindowsVersion>10.0.19041.0</MinimalWindowsVersion>
7+
<WindowsSdkPackageVersion>10.0.22621.57</WindowsSdkPackageVersion>
8+
</PropertyGroup>
9+
</Project>

Directory.Packages.props

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
<!-- Copyright (c) Files Community. Licensed under the MIT License. -->
2+
<Project>
3+
<PropertyGroup>
4+
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
5+
</PropertyGroup>
6+
<ItemGroup>
7+
<PackageVersion Include="ByteSize" Version="2.1.2" />
8+
<PackageVersion Include="ColorCode.WinUI" Version="2.0.15" />
9+
<PackageVersion Include="CommunityToolkit.Labs.WinUI.Controls.MarkdownTextBlock" Version="0.1.250103-build.1988" />
10+
<PackageVersion Include="CommunityToolkit.Mvvm" Version="8.4.0" />
11+
<PackageVersion Include="CommunityToolkit.WinUI.Behaviors" Version="8.2.241112-preview1" />
12+
<PackageVersion Include="CommunityToolkit.WinUI.Controls.ColorPicker" Version="8.2.241112-preview1" />
13+
<PackageVersion Include="CommunityToolkit.WinUI.Controls.Primitives" Version="8.2.241112-preview1" />
14+
<PackageVersion Include="CommunityToolkit.WinUI.Controls.SettingsControls" Version="8.2.241112-preview1" />
15+
<PackageVersion Include="CommunityToolkit.WinUI.Controls.Sizers" Version="8.2.241112-preview1" />
16+
<PackageVersion Include="CommunityToolkit.WinUI.Converters" Version="8.2.241112-preview1" />
17+
<PackageVersion Include="CommunityToolkit.WinUI.Extensions" Version="8.2.241112-preview1" />
18+
<PackageVersion Include="CommunityToolkit.WinUI.Helpers" Version="8.2.241112-preview1" />
19+
<PackageVersion Include="CommunityToolkit.WinUI.Triggers" Version="8.2.241112-preview1" />
20+
<PackageVersion Include="DiscUtils.Udf" Version="0.16.13" />
21+
<PackageVersion Include="FluentFTP" Version="52.0.0" />
22+
<PackageVersion Include="LibGit2Sharp" Version="0.31.0" />
23+
<PackageVersion Include="MessageFormat" Version="7.1.2" />
24+
<PackageVersion Include="Microsoft.Data.Sqlite.Core" Version="9.0.1" />
25+
<PackageVersion Include="Microsoft.Extensions.DependencyInjection" Version="9.0.1" />
26+
<PackageVersion Include="Microsoft.Extensions.Hosting" Version="9.0.1" />
27+
<PackageVersion Include="Microsoft.Extensions.Logging" Version="9.0.1" />
28+
<PackageVersion Include="Microsoft.Windows.SDK.BuildTools" Version="10.0.26100.1742" />
29+
<PackageVersion Include="Sentry" Version="5.0.1" />
30+
<PackageVersion Include="SevenZipSharp" Version="1.0.2" />
31+
<PackageVersion Include="SQLitePCLRaw.bundle_green" Version="2.1.10" />
32+
<PackageVersion Include="Microsoft.WindowsAppSDK" Version="1.6.250108002" />
33+
<PackageVersion Include="Microsoft.Graphics.Win2D" Version="1.3.1" />
34+
<PackageVersion Include="TagLibSharp" Version="2.3.0" />
35+
<PackageVersion Include="Tulpep.ActiveDirectoryObjectPicker" Version="3.0.11" />
36+
<PackageVersion Include="WinUIEx" Version="2.5.1" />
37+
<PackageVersion Include="Vanara.Windows.Extensions" Version="4.0.4" />
38+
<PackageVersion Include="Vanara.Windows.Shell" Version="4.0.4" />
39+
<PackageVersion Include="Microsoft.Management.Infrastructure" Version="3.0.0" />
40+
<PackageVersion Include="Microsoft.Management.Infrastructure.Runtime.Win" Version="3.0.0" />
41+
<PackageVersion Include="Microsoft.Windows.CsWinRT" Version="2.2.0" />
42+
<PackageVersion Include="Microsoft.Windows.CsWin32" Version="0.3.162" />
43+
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp" Version="4.12.0" />
44+
<PackageVersion Include="Microsoft.CodeAnalysis.Analyzers" Version="3.11.0" />
45+
<PackageVersion Include="Microsoft.CodeAnalysis.Workspaces.Common" Version="4.12.0" />
46+
<PackageVersion Include="PolySharp" Version="1.15.0" />
47+
<PackageVersion Include="System.Text.Json" Version="9.0.1" />
48+
<PackageVersion Include="System.IO.Hashing" Version="9.0.1" />
49+
<PackageVersion Include="System.Threading.Tasks.Dataflow" Version="9.0.1" />
50+
<PackageVersion Include="Appium.WebDriver" Version="4.4.5" />
51+
<PackageVersion Include="Axe.Windows" Version="2.4.2" />
52+
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
53+
<PackageVersion Include="MSTest.TestAdapter" Version="3.7.2" />
54+
<PackageVersion Include="MSTest.TestFramework" Version="3.7.2" />
55+
</ItemGroup>
56+
</Project>

global.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
2-
"sdk": {
3-
"version": "8.0.303"
4-
}
2+
"sdk": {
3+
"version": "9.0.100",
4+
"RollForward": "latestMajor"
5+
}
56
}

nuget.config

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,6 @@
22
<configuration>
33
<packageSources>
44
<add key="Project Packages" value="src/Files.App/Assets/Libraries/" />
5+
<add key="Lab-Windows" value="https://pkgs.dev.azure.com/dotnet/CommunityToolkit/_packaging/CommunityToolkit-Labs/nuget/v3/index.json" />
56
</packageSources>
67
</configuration>

src/Files.App (Package)/Files.Package.wapproj

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
1-
<?xml version="1.0" encoding="utf-8"?>
2-
<!-- Copyright (c) Files Community. Licensed under the MIT License. -->
1+
<!-- Copyright (c) Files Community. Licensed under the MIT License. -->
32
<Project ToolsVersion="Current" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
43
<PropertyGroup>
54
<ProjectGuid>8f60fd8e-1921-47d6-97b0-d26d7b3a4999</ProjectGuid>
65
<TargetPlatformVersion>10.0.22621.0</TargetPlatformVersion>
76
<TargetPlatformMinVersion>10.0.19041.0</TargetPlatformMinVersion>
8-
<AssetTargetFallback>net8.0-windows$(TargetPlatformVersion);$(AssetTargetFallback)</AssetTargetFallback>
7+
<AssetTargetFallback>net9.0-windows$(TargetPlatformVersion);$(AssetTargetFallback)</AssetTargetFallback>
98
<DefaultLanguage>en-US</DefaultLanguage>
109
<GenerateAppInstallerFile>False</GenerateAppInstallerFile>
1110
<AppxAutoIncrementPackageRevision>False</AppxAutoIncrementPackageRevision>
@@ -107,8 +106,8 @@
107106
</ProjectReference>
108107
</ItemGroup>
109108
<ItemGroup>
110-
<PackageReference Include="Microsoft.WindowsAppSDK" Version="1.5.241107002" IncludeAssets="build" />
111-
<PackageReference Include="Microsoft.Windows.SDK.BuildTools" Version="10.0.22621.3233" IncludeAssets="build" />
109+
<PackageReference Include="Microsoft.WindowsAppSDK" IncludeAssets="build" />
110+
<PackageReference Include="Microsoft.Windows.SDK.BuildTools" IncludeAssets="build" />
112111
</ItemGroup>
113112
<Import Project="$(WapProjPath)\Microsoft.DesktopBridge.targets" />
114113
<Target Name="RemoveOutOfProcWinMD" BeforeTargets="_GenerateCurrentProjectAppxManifest">

src/Files.App.BackgroundTasks/Files.App.BackgroundTasks.csproj

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
<!-- Copyright (c) Files Community. Licensed under the MIT License. -->
1+
<!-- Copyright (c) Files Community. Licensed under the MIT License. -->
22
<Project Sdk="Microsoft.NET.Sdk">
33

44
<PropertyGroup>
5-
<TargetFramework>net8.0-windows10.0.22621.0</TargetFramework>
5+
<TargetFramework>$(TargetFrameworkVersion)-windows$(TargetWindowsVersion)</TargetFramework>
66
<DefaultLanguage>en-US</DefaultLanguage>
7-
<TargetPlatformMinVersion>10.0.19041.0</TargetPlatformMinVersion>
7+
<TargetPlatformMinVersion>$(MinimalWindowsVersion)</TargetPlatformMinVersion>
88
<IsTrimmable>true</IsTrimmable>
99
<Configurations>Debug;Release</Configurations>
1010
<Platforms>x86;x64;ARM64</Platforms>
@@ -13,7 +13,7 @@
1313

1414
<PropertyGroup>
1515
<CsWinRTComponent>true</CsWinRTComponent>
16-
<CsWinRTWindowsMetadata>10.0.22621.0</CsWinRTWindowsMetadata>
16+
<CsWinRTWindowsMetadata>$(TargetWindowsVersion)</CsWinRTWindowsMetadata>
1717
<CsWinRTGeneratedFilesDir>$(MSBuildProjectDirectory)\bin\$(Platform)\$(Configuration)</CsWinRTGeneratedFilesDir>
1818
</PropertyGroup>
1919

@@ -26,7 +26,7 @@
2626
</PropertyGroup>
2727

2828
<ItemGroup>
29-
<PackageReference Include="Microsoft.Windows.CsWinRT" Version="2.0.7" />
29+
<PackageReference Include="Microsoft.Windows.CsWinRT" />
3030
</ItemGroup>
3131

3232
</Project>
Lines changed: 160 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,160 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using System.Text;
5+
using System.Threading.Tasks;
6+
using System.Windows.Input;
7+
8+
namespace Files.App.Controls
9+
{
10+
/// <summary>
11+
/// The AdaptiveGridView control allows to present information within a Grid View perfectly adjusting the
12+
/// total display available space. It reacts to changes in the layout as well as the content so it can adapt
13+
/// to different form factors automatically.
14+
/// </summary>
15+
/// <remarks>
16+
/// The number and the width of items are calculated based on the
17+
/// screen resolution in order to fully leverage the available screen space. The property ItemsHeight define
18+
/// the items fixed height and the property DesiredWidth sets the minimum width for the elements to add a
19+
/// new column.</remarks>
20+
public partial class AdaptiveGridView
21+
{
22+
/// <summary>
23+
/// Identifies the <see cref="ItemClickCommand"/> dependency property.
24+
/// </summary>
25+
public static readonly DependencyProperty ItemClickCommandProperty =
26+
DependencyProperty.Register(nameof(ItemClickCommand), typeof(ICommand), typeof(AdaptiveGridView), new PropertyMetadata(null));
27+
28+
/// <summary>
29+
/// Identifies the <see cref="ItemHeight"/> dependency property.
30+
/// </summary>
31+
public static readonly DependencyProperty ItemHeightProperty =
32+
DependencyProperty.Register(nameof(ItemHeight), typeof(double), typeof(AdaptiveGridView), new PropertyMetadata(double.NaN));
33+
34+
/// <summary>
35+
/// Identifies the <see cref="OneRowModeEnabled"/> dependency property.
36+
/// </summary>
37+
public static readonly DependencyProperty OneRowModeEnabledProperty =
38+
DependencyProperty.Register(nameof(OneRowModeEnabled), typeof(bool), typeof(AdaptiveGridView), new PropertyMetadata(false, (o, e) => { OnOneRowModeEnabledChanged(o, e.NewValue); }));
39+
40+
/// <summary>
41+
/// Identifies the <see cref="ItemWidth"/> dependency property.
42+
/// </summary>
43+
private static readonly DependencyProperty ItemWidthProperty =
44+
DependencyProperty.Register(nameof(ItemWidth), typeof(double), typeof(AdaptiveGridView), new PropertyMetadata(double.NaN));
45+
46+
/// <summary>
47+
/// Identifies the <see cref="DesiredWidth"/> dependency property.
48+
/// </summary>
49+
public static readonly DependencyProperty DesiredWidthProperty =
50+
DependencyProperty.Register(nameof(DesiredWidth), typeof(double), typeof(AdaptiveGridView), new PropertyMetadata(double.NaN, DesiredWidthChanged));
51+
52+
/// <summary>
53+
/// Identifies the <see cref="StretchContentForSingleRow"/> dependency property.
54+
/// </summary>
55+
public static readonly DependencyProperty StretchContentForSingleRowProperty =
56+
DependencyProperty.Register(nameof(StretchContentForSingleRow), typeof(bool), typeof(AdaptiveGridView), new PropertyMetadata(true, OnStretchContentForSingleRowPropertyChanged));
57+
58+
private static void OnOneRowModeEnabledChanged(DependencyObject d, object newValue)
59+
{
60+
var self = d as AdaptiveGridView;
61+
self.DetermineOneRowMode();
62+
}
63+
64+
private static void DesiredWidthChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
65+
{
66+
var self = d as AdaptiveGridView;
67+
self.RecalculateLayout(self.ActualWidth);
68+
}
69+
70+
private static void OnStretchContentForSingleRowPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
71+
{
72+
var self = d as AdaptiveGridView;
73+
self.RecalculateLayout(self.ActualWidth);
74+
}
75+
76+
/// <summary>
77+
/// Gets or sets the desired width of each item
78+
/// </summary>
79+
/// <value>The width of the desired.</value>
80+
public double DesiredWidth
81+
{
82+
get { return (double)GetValue(DesiredWidthProperty); }
83+
set { SetValue(DesiredWidthProperty, value); }
84+
}
85+
86+
/// <summary>
87+
/// Gets or sets a value indicating whether the control should stretch the content to fill at least one row.
88+
/// </summary>
89+
/// <remarks>
90+
/// If set to <c>true</c> (default) and there is only one row of items, the items will be stretched to fill the complete row.
91+
/// If set to <c>false</c>, items will have their normal size, which means a gap can exist at the end of the row.
92+
/// </remarks>
93+
/// <value>A value indicating whether the control should stretch the content to fill at least one row.</value>
94+
public bool StretchContentForSingleRow
95+
{
96+
get { return (bool)GetValue(StretchContentForSingleRowProperty); }
97+
set { SetValue(StretchContentForSingleRowProperty, value); }
98+
}
99+
100+
/// <summary>
101+
/// Gets or sets the command to execute when an item is clicked and the IsItemClickEnabled property is true.
102+
/// </summary>
103+
/// <value>The item click command.</value>
104+
public ICommand ItemClickCommand
105+
{
106+
get { return (ICommand)GetValue(ItemClickCommandProperty); }
107+
set { SetValue(ItemClickCommandProperty, value); }
108+
}
109+
110+
/// <summary>
111+
/// Gets or sets the height of each item in the grid.
112+
/// </summary>
113+
/// <value>The height of the item.</value>
114+
public double ItemHeight
115+
{
116+
get { return (double)GetValue(ItemHeightProperty); }
117+
set { SetValue(ItemHeightProperty, value); }
118+
}
119+
120+
/// <summary>
121+
/// Gets or sets a value indicating whether only one row should be displayed.
122+
/// </summary>
123+
/// <value><c>true</c> if only one row is displayed; otherwise, <c>false</c>.</value>
124+
public bool OneRowModeEnabled
125+
{
126+
get { return (bool)GetValue(OneRowModeEnabledProperty); }
127+
set { SetValue(OneRowModeEnabledProperty, value); }
128+
}
129+
130+
/// <summary>
131+
/// Gets the template that defines the panel that controls the layout of items.
132+
/// </summary>
133+
/// <remarks>
134+
/// This property overrides the base ItemsPanel to prevent changing it.
135+
/// </remarks>
136+
/// <returns>
137+
/// An ItemsPanelTemplate that defines the panel to use for the layout of the items.
138+
/// The default value for the ItemsControl is an ItemsPanelTemplate that specifies
139+
/// a StackPanel.
140+
/// </returns>
141+
public new ItemsPanelTemplate ItemsPanel => base.ItemsPanel;
142+
143+
private double ItemWidth
144+
{
145+
get { return (double)GetValue(ItemWidthProperty); }
146+
set { SetValue(ItemWidthProperty, value); }
147+
}
148+
149+
private static int CalculateColumns(double containerWidth, double itemWidth)
150+
{
151+
var columns = (int)Math.Round(containerWidth / itemWidth);
152+
if (columns == 0)
153+
{
154+
columns = 1;
155+
}
156+
157+
return columns;
158+
}
159+
}
160+
}

0 commit comments

Comments
 (0)