Skip to content

Commit

Permalink
Migrate to CommunityToolkit.Uwp
Browse files Browse the repository at this point in the history
  • Loading branch information
Guerra24 committed Sep 25, 2023
1 parent ff22fac commit 0024f47
Show file tree
Hide file tree
Showing 23 changed files with 43 additions and 34 deletions.
2 changes: 1 addition & 1 deletion LRReader.UWP/App.xaml.cs
Expand Up @@ -13,7 +13,7 @@
using Windows.UI.Xaml;
using Windows.UI.Xaml.Media;
using static LRReader.Shared.Services.Service;
using ColorHelper = Microsoft.Toolkit.Uwp.Helpers.ColorHelper;
using ColorHelper = CommunityToolkit.WinUI.Helpers.ColorHelper;
using UnhandledExceptionEventArgs = Windows.UI.Xaml.UnhandledExceptionEventArgs;

namespace LRReader.UWP
Expand Down
6 changes: 3 additions & 3 deletions LRReader.UWP/Extensions/Extensions.cs
Expand Up @@ -2,10 +2,10 @@
using System.Numerics;
using System.Threading.Tasks;
using System.Windows.Input;
using CommunityToolkit.WinUI;
using CommunityToolkit.WinUI.Animations;
using CommunityToolkit.WinUI.Media;
using LRReader.Shared.Extensions;
using Microsoft.Toolkit.Uwp.UI;
using Microsoft.Toolkit.Uwp.UI.Animations;
using Microsoft.Toolkit.Uwp.UI.Media;
using Windows.Foundation;
using Windows.Graphics.Display;
using Windows.System;
Expand Down
4 changes: 2 additions & 2 deletions LRReader.UWP/Init.cs
Expand Up @@ -3,8 +3,8 @@
using LRReader.UWP.Services;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.DependencyInjection.Extensions;
using Microsoft.Toolkit.Uwp.Helpers;
using Microsoft.Web.WebView2.Core;
using Windows.System.Profile;

namespace LRReader.UWP
{
Expand Down Expand Up @@ -35,7 +35,7 @@ public static void EarlyInit()

public static bool CanUseWebView2()
{
bool canUseWebView2 = SystemInformation.Instance.DeviceFamily.Equals("Windows.Desktop");
bool canUseWebView2 = AnalyticsInfo.VersionInfo.DeviceFamily.Equals("Windows.Desktop");
if (canUseWebView2)
{
try
Expand Down
27 changes: 18 additions & 9 deletions LRReader.UWP/LRReader.UWP.csproj
Expand Up @@ -412,18 +412,30 @@
</ApplicationDefinition>
</ItemGroup>
<ItemGroup>
<PackageReference Include="CommunityToolkit.Uwp.Animations">
<Version>8.0.230907</Version>
</PackageReference>
<PackageReference Include="CommunityToolkit.Uwp.Controls.Primitives">
<Version>8.0.230907</Version>
</PackageReference>
<PackageReference Include="CommunityToolkit.Uwp.Controls.Sizers">
<Version>8.0.230907</Version>
</PackageReference>
<PackageReference Include="CommunityToolkit.Uwp.Converters">
<Version>8.0.230907</Version>
</PackageReference>
<PackageReference Include="CommunityToolkit.Uwp.Helpers">
<Version>8.0.230907</Version>
</PackageReference>
<PackageReference Include="CommunityToolkit.Uwp.Media">
<Version>8.0.230907</Version>
</PackageReference>
<PackageReference Include="Microsoft.AppCenter.Crashes">
<Version>5.0.2</Version>
</PackageReference>
<PackageReference Include="Microsoft.NETCore.UniversalWindowsPlatform">
<Version>6.2.14</Version>
</PackageReference>
<PackageReference Include="Microsoft.Toolkit.Uwp.Connectivity">
<Version>7.1.3</Version>
</PackageReference>
<PackageReference Include="Microsoft.Toolkit.Uwp.UI.Animations">
<Version>7.1.3</Version>
</PackageReference>
<PackageReference Include="Microsoft.Toolkit.Uwp.UI.Controls.Core">
<Version>7.1.3</Version>
</PackageReference>
Expand All @@ -433,9 +445,6 @@
<PackageReference Include="Microsoft.Toolkit.Uwp.UI.Controls.Markdown">
<Version>7.1.3</Version>
</PackageReference>
<PackageReference Include="Microsoft.Toolkit.Uwp.UI.Media">
<Version>7.1.3</Version>
</PackageReference>
<PackageReference Include="Microsoft.UI.Xaml">
<Version>2.8.2-prerelease.220830001</Version>
</PackageReference>
Expand Down
2 changes: 1 addition & 1 deletion LRReader.UWP/Resources/Converters.xaml
@@ -1,7 +1,7 @@
<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:converters="using:Microsoft.Toolkit.Uwp.UI.Converters"
xmlns:converters="using:CommunityToolkit.WinUI.Converters"
xmlns:converters2="using:LRReader.Converters">

<converters:BoolToVisibilityConverter x:Name="BoolToVisibilityConverter" />
Expand Down
2 changes: 1 addition & 1 deletion LRReader.UWP/Resources/Templates.xaml
Expand Up @@ -4,7 +4,7 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:controls="using:LRReader.UWP.Views.Controls"
xmlns:items="using:LRReader.UWP.Views.Items"
xmlns:media="using:Microsoft.Toolkit.Uwp.UI.Media"
xmlns:media="using:CommunityToolkit.WinUI.Media"
xmlns:muxc="using:Microsoft.UI.Xaml.Controls"
xmlns:services="using:LRReader.Shared.Services">

Expand Down
2 changes: 1 addition & 1 deletion LRReader.UWP/Services/Dispatcher.cs
@@ -1,7 +1,7 @@
using System;
using System.Threading.Tasks;
using CommunityToolkit.WinUI;
using LRReader.Shared.Services;
using Microsoft.Toolkit.Uwp;
using Windows.System;

namespace LRReader.UWP.Services
Expand Down
2 changes: 1 addition & 1 deletion LRReader.UWP/Services/Updates.cs
Expand Up @@ -2,12 +2,12 @@
using System;
using System.Linq;
using System.Threading.Tasks;
using CommunityToolkit.WinUI.Helpers;
using LRReader.Shared;
using LRReader.Shared.Models;
using LRReader.Shared.Services;
using Microsoft.AppCenter.Crashes;
using Microsoft.Extensions.Logging;
using Microsoft.Toolkit.Uwp.Connectivity;
using RestSharp;
using Windows.ApplicationModel;
using Windows.Foundation;
Expand Down
2 changes: 1 addition & 1 deletion LRReader.UWP/Views/Content/Settings/About.xaml.cs
@@ -1,7 +1,7 @@
using System;
using CommunityToolkit.WinUI.Helpers;
using LRReader.Shared.ViewModels;
using LRReader.UWP.Views.Dialogs;
using Microsoft.Toolkit.Uwp.UI.Helpers;
using Windows.ApplicationModel.Resources;
using Windows.Storage;
using Windows.UI.Xaml;
Expand Down
2 changes: 1 addition & 1 deletion LRReader.UWP/Views/Content/Settings/Reader.xaml
Expand Up @@ -3,7 +3,7 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:controls="using:LRReader.UWP.Views.Controls"
xmlns:converters="using:Microsoft.Toolkit.Uwp.UI.Converters"
xmlns:converters="using:CommunityToolkit.WinUI.Converters"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:internal="using:LRReader.Internal"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
Expand Down
2 changes: 1 addition & 1 deletion LRReader.UWP/Views/Content/Settings/Server.xaml.cs
@@ -1,8 +1,8 @@
using System;
using System.Collections.Generic;
using CommunityToolkit.WinUI.Helpers;
using LRReader.Shared.ViewModels;
using LRReader.UWP.Views.Controls;
using Microsoft.Toolkit.Uwp.UI.Helpers;
using Windows.Storage;
using Windows.Storage.Pickers;
using Windows.Storage.Provider;
Expand Down
2 changes: 1 addition & 1 deletion LRReader.UWP/Views/Content/Tools/Deduplicator.xaml.cs
@@ -1,11 +1,11 @@
#nullable enable
using System;
using CommunityToolkit.WinUI.Animations;
using LRReader.Shared.Models.Main;
using LRReader.Shared.Services;
using LRReader.Shared.ViewModels.Tools;
using LRReader.UWP.Extensions;
using LRReader.UWP.Views.Controls;
using Microsoft.Toolkit.Uwp.UI.Animations;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Controls.Primitives;
Expand Down
2 changes: 1 addition & 1 deletion LRReader.UWP/Views/Content/Tools/DeduplicatorHidden.xaml
Expand Up @@ -2,7 +2,7 @@
x:Class="LRReader.UWP.Views.Content.Tools.DeduplicatorHidden"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:converters="using:Microsoft.Toolkit.Uwp.UI.Converters"
xmlns:converters="using:CommunityToolkit.WinUI.Converters"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:ext="using:LRReader.UWP.Extensions"
xmlns:items="using:LRReader.Shared.Models.Main"
Expand Down
2 changes: 1 addition & 1 deletion LRReader.UWP/Views/Controls/ArchiveTags.xaml
Expand Up @@ -2,7 +2,7 @@
x:Class="LRReader.UWP.Views.Controls.ArchiveTags"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:controls="using:Microsoft.Toolkit.Uwp.UI.Controls"
xmlns:controls="using:CommunityToolkit.WinUI.Controls"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="using:LRReader.UWP.Views.Controls"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
Expand Down
2 changes: 1 addition & 1 deletion LRReader.UWP/Views/Controls/ModernExpander.xaml
Expand Up @@ -2,7 +2,7 @@
x:Class="LRReader.UWP.Views.Controls.ModernExpander"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:converters="using:Microsoft.Toolkit.Uwp.UI.Converters"
xmlns:converters="using:CommunityToolkit.WinUI.Converters"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="using:LRReader.UWP.Views.Controls"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
Expand Down
2 changes: 1 addition & 1 deletion LRReader.UWP/Views/Controls/ModernPageTab.xaml
Expand Up @@ -2,7 +2,7 @@
x:Class="LRReader.UWP.Views.Controls.ModernPageTab"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:converters="using:Microsoft.Toolkit.Uwp.UI.Converters"
xmlns:converters="using:CommunityToolkit.WinUI.Converters"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="using:LRReader.UWP.Views.Controls"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
Expand Down
2 changes: 1 addition & 1 deletion LRReader.UWP/Views/Dialogs/ValidateApiDialog.xaml
Expand Up @@ -2,7 +2,7 @@
x:Class="LRReader.UWP.Views.Dialogs.ValidateApiDialog"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:converters="using:Microsoft.Toolkit.Uwp.UI.Converters"
xmlns:converters="using:CommunityToolkit.WinUI.Converters"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="using:LRReader.UWP.Views.Dialogs"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
Expand Down
2 changes: 1 addition & 1 deletion LRReader.UWP/Views/Items/ArchiveImage.cs
@@ -1,12 +1,12 @@
#nullable enable
using System;
using System.Threading.Tasks;
using CommunityToolkit.WinUI.Animations;
using LRReader.Shared.Models.Main;
using LRReader.Shared.Services;
using LRReader.Shared.ViewModels.Items;
using LRReader.UWP.Extensions;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Toolkit.Uwp.UI.Animations;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Input;
Expand Down
2 changes: 1 addition & 1 deletion LRReader.UWP/Views/Items/GenericArchiveItem.cs
Expand Up @@ -3,13 +3,13 @@
using System.Collections.Generic;
using System.Reflection;
using System.Threading.Tasks;
using CommunityToolkit.WinUI.Animations;
using LRReader.Shared;
using LRReader.Shared.Models.Main;
using LRReader.Shared.Services;
using LRReader.Shared.ViewModels.Items;
using LRReader.UWP.Extensions;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Toolkit.Uwp.UI.Animations;
using Windows.Devices.Input;
using Windows.Storage;
using Windows.Storage.Pickers;
Expand Down
2 changes: 1 addition & 1 deletion LRReader.UWP/Views/Items/ReaderImage.xaml.cs
Expand Up @@ -2,10 +2,10 @@
using System;
using System.Threading;
using System.Threading.Tasks;
using CommunityToolkit.WinUI.Animations;
using LRReader.Shared.Models.Main;
using LRReader.Shared.Services;
using LRReader.UWP.Extensions;
using Microsoft.Toolkit.Uwp.UI.Animations;
using Windows.Foundation;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
Expand Down
2 changes: 1 addition & 1 deletion LRReader.UWP/Views/Tabs/ArchiveTab.xaml
Expand Up @@ -4,7 +4,7 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:content="using:LRReader.UWP.Views.Tabs.Content"
xmlns:controls="using:LRReader.UWP.Views.Controls"
xmlns:converters="using:Microsoft.Toolkit.Uwp.UI.Converters"
xmlns:converters="using:CommunityToolkit.WinUI.Converters"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="using:LRReader.UWP.Views.Tabs"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
Expand Down
2 changes: 1 addition & 1 deletion LRReader.UWP/Views/Tabs/Content/ArchiveEdit.xaml.cs
Expand Up @@ -3,11 +3,11 @@
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using CommunityToolkit.WinUI.Animations;
using LRReader.Shared.Models.Main;
using LRReader.Shared.Services;
using LRReader.Shared.ViewModels;
using LRReader.UWP.Extensions;
using Microsoft.Toolkit.Uwp.UI.Animations;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Media.Animation;
Expand Down
2 changes: 1 addition & 1 deletion LRReader.UWP/Views/Tabs/Content/ArchiveTabContent.xaml.cs
Expand Up @@ -6,14 +6,14 @@
using System.Threading;
using System.Threading.Tasks;
using CommunityToolkit.Mvvm.Input;
using CommunityToolkit.WinUI.Animations;
using LRReader.Shared.Extensions;
using LRReader.Shared.Models.Main;
using LRReader.Shared.Services;
using LRReader.Shared.ViewModels;
using LRReader.UWP.Extensions;
using LRReader.UWP.Views.Items;
using Microsoft.Toolkit.Uwp.UI;
using Microsoft.Toolkit.Uwp.UI.Animations;
using Windows.Devices.Input;
using Windows.Foundation;
using Windows.Storage;
Expand Down

0 comments on commit 0024f47

Please sign in to comment.