diff --git a/.gitignore b/.gitignore index 582e527d..1350eb2e 100644 --- a/.gitignore +++ b/.gitignore @@ -329,4 +329,5 @@ ASALocalRun/ # MFractors (Xamarin productivity tool) working folder .mfractor/ -*.token.cs \ No newline at end of file +*.token.cs +src/.vsconfig diff --git a/build/scripts/wasm-uitest-run.sh b/build/scripts/wasm-uitest-run.sh index 5bccd50a..d74eaf34 100644 --- a/build/scripts/wasm-uitest-run.sh +++ b/build/scripts/wasm-uitest-run.sh @@ -8,19 +8,18 @@ export UNO_UITEST_CHROME_BINARY_PATH=$BUILD_SOURCESDIRECTORY/build/node_modules/ export UNO_UITEST_SCREENSHOT_PATH=$BUILD_ARTIFACTSTAGINGDIRECTORY/screenshots/wasm export UNO_UITEST_PLATFORM=Browser export UNO_UITEST_CHROME_CONTAINER_MODE=true -export UNO_UITEST_PROJECT=$BUILD_SOURCESDIRECTORY/src/ToDo.UI.Tests/ToDo.UI.Tests.csproj -export UNO_UITEST_BINARY=$BUILD_SOURCESDIRECTORY/src/ToDo.UI.Tests/bin/Release/net48/ToDo.UI.Tests.dll -export UNO_UITEST_LOGFILE=$BUILD_ARTIFACTSTAGINGDIRECTORY/screenshots/wasm/nunit-log.txt +export UNO_UITEST_PROJECT_PATH=$BUILD_SOURCESDIRECTORY/src/ToDo.UITests +export UNO_UITEST_BINARY=$BUILD_SOURCESDIRECTORY/src/ToDo.UITests/bin/Release/net7.0/ToDo.UITests.dll +export UNO_UITEST_LOGFILE=$BUILD_ARTIFACTSTAGINGDIRECTORY/screenshots/wasm/nunit-log.xml export UNO_UITEST_WASM_PROJECT=$BUILD_SOURCESDIRECTORY/src/ToDo.Wasm/ToDo.Wasm.csproj -export UNO_UITEST_WASM_OUTPUT_PATH=$BUILD_SOURCESDIRECTORY/src/ToDo.Wasm/bin/Release/net6.0/dist/ +export UNO_UITEST_WASM_OUTPUT_PATH=$BUILD_SOURCESDIRECTORY/src/ToDo.Wasm/bin/Release/net7.0/dist/ export UNO_UITEST_NUNIT_VERSION=3.11.1 export UNO_UITEST_DOTNETSERVE_VERSION=1.10.112 export UNO_UITEST_NUGET_URL=https://dist.nuget.org/win-x86-commandline/v5.7.0/nuget.exe cd $BUILD_SOURCESDIRECTORY -msbuild /r /p:Configuration=Release $UNO_UITEST_PROJECT -dotnet build /p:Configuration=Release $UNO_UITEST_WASM_PROJECT /p:IsUiAutomationMappingEnabled=True +dotnet build /p:Configuration=Release $UNO_UITEST_WASM_PROJECT /p:IsUiAutomationMappingEnabled=True /p:DisableNet7=True # install dotnet serve / Remove as needed dotnet tool uninstall dotnet-serve -g || true @@ -38,11 +37,13 @@ cd $BUILD_SOURCESDIRECTORY/build npm i chromedriver@86.0.0 npm i puppeteer@5.3.1 -wget $UNO_UITEST_NUGET_URL -mono nuget.exe install NUnit.ConsoleRunner -Version $UNO_UITEST_NUNIT_VERSION mkdir -p $UNO_UITEST_SCREENSHOT_PATH -mono $BUILD_SOURCESDIRECTORY/build/NUnit.ConsoleRunner.$UNO_UITEST_NUNIT_VERSION/tools/nunit3-console.exe \ - --trace=Verbose --inprocess --agents=1 --workers=1 \ - $UNO_UITEST_BINARY || true + +cd $UNO_UITEST_PROJECT_PATH +dotnet test \ + -c Release \ + -l:"console;verbosity=normal" \ + --logger "nunit;LogFileName=$UNO_UITEST_LOGFILE" \ + || true diff --git a/build/workflow/pipeline.yml b/build/workflow/pipeline.yml index 1be8fbb6..5d6f8350 100644 --- a/build/workflow/pipeline.yml +++ b/build/workflow/pipeline.yml @@ -23,10 +23,6 @@ variables: IsCanaryBranch: $[startsWith(variables['Build.SourceBranch'], 'refs/heads/canaries/')] IsReleaseBranch: $[or(eq(variables['Build.SourceBranch'], 'refs/heads/main'), startsWith(variables['Build.SourceBranch'], 'refs/heads/feature/'), startsWith(variables['Build.SourceBranch'], 'refs/heads/release/'))] - ANDROID_NDK_HOME: C:\Microsoft\AndroidNDK64\android-ndk-r16b - ANDROID_NDK_PATH: C:\Microsoft\AndroidNDK64\android-ndk-r16b - AndroidNdkDirectory: C:\Microsoft\AndroidNDK64\android-ndk-r16b - jobs: - job: Windows pool: @@ -34,7 +30,7 @@ jobs: steps: - template: templates/gitversion.yml - - template: templates/dotnet6-install-windows.yml + - template: templates/dotnet7-install-windows.yml # This SDK version is needed as long as `uap10.0` will be supported in Uno.Core - powershell: .\build\Install-WindowsSdkISO.ps1 18362 diff --git a/build/workflow/templates/dotnet6-install-mac.yml b/build/workflow/templates/dotnet7-install-mac.yml similarity index 92% rename from build/workflow/templates/dotnet6-install-mac.yml rename to build/workflow/templates/dotnet7-install-mac.yml index f0da046e..5e40909b 100644 --- a/build/workflow/templates/dotnet6-install-mac.yml +++ b/build/workflow/templates/dotnet7-install-mac.yml @@ -1,7 +1,7 @@ parameters: - DotNetVersion: '6.0.300' - UnoCheck_Version: '1.3.0' - UnoCheck_Manifest: 'https://raw.githubusercontent.com/unoplatform/uno.check/8c7f669060a6cca50f71bb0845281c424ad7eb0d/manifests/uno.ui-preview.manifest.json' + DotNetVersion: '7.0.203' + UnoCheck_Version: '1.5.4' + UnoCheck_Manifest: 'https://raw.githubusercontent.com/unoplatform/uno.check/146b0b4b23d866bef455494a12ad7ffd2f6f2d20/manifests/uno.ui.manifest.json' Dotnet_Root: '/usr/local/share/dotnet/' Dotnet_Tools: '~/.dotnet/tools' diff --git a/build/workflow/templates/dotnet6-install-windows.yml b/build/workflow/templates/dotnet7-install-windows.yml similarity index 89% rename from build/workflow/templates/dotnet6-install-windows.yml rename to build/workflow/templates/dotnet7-install-windows.yml index 5da840e7..76bca47d 100644 --- a/build/workflow/templates/dotnet6-install-windows.yml +++ b/build/workflow/templates/dotnet7-install-windows.yml @@ -1,7 +1,7 @@ parameters: - DotNetVersion: '6.0.300' - UnoCheck_Version: '1.3.0' - UnoCheck_Manifest: 'https://raw.githubusercontent.com/unoplatform/uno.check/8c7f669060a6cca50f71bb0845281c424ad7eb0d/manifests/uno.ui-preview.manifest.json' + DotNetVersion: '7.0.203' + UnoCheck_Version: '1.5.4' + UnoCheck_Manifest: 'https://raw.githubusercontent.com/unoplatform/uno.check/146b0b4b23d866bef455494a12ad7ffd2f6f2d20/manifests/uno.ui.manifest.json' steps: diff --git a/build/workflow/uitests-wasm.yml b/build/workflow/uitests-wasm.yml index f6988e82..772308e2 100644 --- a/build/workflow/uitests-wasm.yml +++ b/build/workflow/uitests-wasm.yml @@ -14,11 +14,11 @@ jobs: clean: true - task: UseDotNet@2 - displayName: 'Use .Net Core runtime 6.0.x' + displayName: 'Use .Net Core runtime 7.0.x' retryCountOnTaskFailure: 3 inputs: packageType: sdk - version: 6.0.300 + version: 7.0.203 - bash: | bash build/scripts/wasm-uitest-run.sh diff --git a/src/.vsconfig b/src/.vsconfig deleted file mode 100644 index 99c343c0..00000000 --- a/src/.vsconfig +++ /dev/null @@ -1,112 +0,0 @@ -{ - "version": "1.0", - "components": [ - "Microsoft.VisualStudio.Component.CoreEditor", - "Microsoft.VisualStudio.Workload.CoreEditor", - "Microsoft.NetCore.Component.Runtime.3.1", - "Microsoft.NetCore.Component.SDK", - "Microsoft.VisualStudio.Component.NuGet", - "Microsoft.Net.Component.4.6.1.TargetingPack", - "Microsoft.VisualStudio.Component.Roslyn.Compiler", - "Microsoft.VisualStudio.Component.Roslyn.LanguageServices", - "Microsoft.NetCore.Component.DevelopmentTools", - "Microsoft.VisualStudio.ComponentGroup.WebToolsExtensions", - "Microsoft.VisualStudio.Component.DockerTools", - "Microsoft.NetCore.Component.Web", - "Microsoft.Net.Component.4.8.SDK", - "Microsoft.Net.Component.4.7.2.TargetingPack", - "Microsoft.Net.ComponentGroup.DevelopmentPrerequisites", - "Microsoft.VisualStudio.Component.TypeScript.4.0", - "Microsoft.VisualStudio.Component.JavaScript.TypeScript", - "Microsoft.VisualStudio.Component.JavaScript.Diagnostics", - "Microsoft.Component.MSBuild", - "Microsoft.VisualStudio.Component.TextTemplating", - "Component.Microsoft.VisualStudio.RazorExtension", - "Microsoft.VisualStudio.Component.IISExpress", - "Microsoft.VisualStudio.Component.SQL.ADAL", - "Microsoft.VisualStudio.Component.SQL.LocalDB.Runtime", - "Microsoft.VisualStudio.Component.Common.Azure.Tools", - "Microsoft.VisualStudio.Component.SQL.CLR", - "Microsoft.VisualStudio.Component.MSODBC.SQL", - "Microsoft.VisualStudio.Component.MSSQL.CMDLnUtils", - "Microsoft.VisualStudio.Component.ManagedDesktop.Core", - "Microsoft.Net.Component.4.5.2.TargetingPack", - "Microsoft.Net.Component.4.5.TargetingPack", - "Microsoft.VisualStudio.Component.SQL.SSDT", - "Microsoft.VisualStudio.Component.SQL.DataSources", - "Component.Microsoft.Web.LibraryManager", - "Microsoft.VisualStudio.ComponentGroup.Web", - "Microsoft.VisualStudio.Component.Web", - "Microsoft.VisualStudio.Component.IntelliCode", - "Component.Microsoft.VisualStudio.LiveShare", - "Microsoft.VisualStudio.ComponentGroup.Web.Client", - "Microsoft.Net.Component.4.TargetingPack", - "Microsoft.Net.Component.4.5.1.TargetingPack", - "Microsoft.Net.Component.4.6.TargetingPack", - "Microsoft.Net.ComponentGroup.TargetingPacks.Common", - "Component.Microsoft.VisualStudio.Web.AzureFunctions", - "Microsoft.VisualStudio.ComponentGroup.AzureFunctions", - "Microsoft.VisualStudio.Component.Azure.Compute.Emulator", - "Microsoft.VisualStudio.Component.Azure.Storage.Emulator", - "Microsoft.VisualStudio.Component.Azure.ClientLibs", - "Microsoft.VisualStudio.Component.Azure.AuthoringTools", - "Microsoft.VisualStudio.Component.CloudExplorer", - "Microsoft.VisualStudio.ComponentGroup.Web.CloudTools", - "Microsoft.VisualStudio.Component.DiagnosticTools", - "Microsoft.VisualStudio.Component.EntityFramework", - "Microsoft.VisualStudio.Component.AspNet45", - "Microsoft.VisualStudio.Component.AppInsights.Tools", - "Microsoft.VisualStudio.Component.WebDeploy", - "Microsoft.VisualStudio.Component.Wcf.Tooling", - "Microsoft.Net.Component.4.6.2.TargetingPack", - "Microsoft.Net.Component.4.7.TargetingPack", - "Microsoft.Net.Component.4.7.1.TargetingPack", - "Microsoft.VisualStudio.Workload.NetWeb", - "Microsoft.VisualStudio.ComponentGroup.Azure.Prerequisites", - "Microsoft.VisualStudio.Component.Azure.Waverton.BuildTools", - "Microsoft.VisualStudio.Component.Azure.Waverton", - "Microsoft.Component.Azure.DataLake.Tools", - "Microsoft.VisualStudio.Component.Azure.Kubernetes.Tools", - "Microsoft.VisualStudio.Component.Azure.ResourceManager.Tools", - "Microsoft.VisualStudio.ComponentGroup.Azure.ResourceManager.Tools", - "Microsoft.VisualStudio.ComponentGroup.Azure.CloudServices", - "Microsoft.VisualStudio.Component.Azure.ServiceFabric.Tools", - "Microsoft.VisualStudio.Workload.Azure", - "Microsoft.VisualStudio.Component.VC.CoreIde", - "Microsoft.VisualStudio.Component.VC.Tools.x86.x64", - "Microsoft.VisualStudio.Component.Graphics.Tools", - "Microsoft.VisualStudio.Component.Windows10SDK.19041", - "Microsoft.VisualStudio.Component.ManagedDesktop.Prerequisites", - "Microsoft.ComponentGroup.Blend", - "Microsoft.VisualStudio.Component.Debugger.JustInTime", - "Microsoft.VisualStudio.Component.PortableLibrary", - "Microsoft.VisualStudio.ComponentGroup.MSIX.Packaging", - "Microsoft.VisualStudio.Workload.ManagedDesktop", - "Microsoft.VisualStudio.Component.Windows10SDK.18362", - "Microsoft.VisualStudio.Component.Windows10SDK.17763", - "Microsoft.Component.NetFX.Native", - "Microsoft.VisualStudio.ComponentGroup.UWP.NetCoreAndStandard", - "Microsoft.VisualStudio.Component.Graphics", - "Microsoft.VisualStudio.ComponentGroup.UWP.Xamarin", - "Microsoft.VisualStudio.ComponentGroup.UWP.Support", - "Microsoft.VisualStudio.Component.VC.Tools.ARM64", - "Microsoft.VisualStudio.Component.UWP.VC.ARM64", - "Microsoft.VisualStudio.Component.VC.Tools.ARM", - "Microsoft.VisualStudio.ComponentGroup.UWP.VC", - "Microsoft.VisualStudio.Workload.Universal", - "Component.OpenJDK", - "Microsoft.VisualStudio.Component.MonoDebugger", - "Microsoft.VisualStudio.Component.Merq", - "Component.Xamarin.RemotedSimulator", - "Microsoft.VisualStudio.ComponentGroup.WebToolsExtensions.TemplateEngine", - "Component.Xamarin", - "Component.Android.SDK28", - "Microsoft.VisualStudio.Workload.NetCrossPlat", - "Microsoft.VisualStudio.Workload.NetCoreTools", - "Microsoft.Net.Component.4.6.1.SDK", - "Microsoft.Net.Component.4.6.2.SDK", - "Microsoft.Net.Component.4.7.SDK", - "Microsoft.Net.Component.4.7.1.SDK", - "Microsoft.Net.Component.4.7.2.SDK" - ] -} diff --git a/src/Directory.Build.props b/src/Directory.Build.props index 3de8595f..84640a73 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -1,24 +1,56 @@ - 10.0 - True + 11 + enable enable - true - true - - - portable True - Uno0001;CS1998;CA1416;NU1504;NU1505;NU1507 - true - + true - - 4.7.0-dev.73 - 2.3.0-dev.263 - 2.4.0-dev.110 - 2.4.0-dev.57 + True + $(NoWarn);Uno0001;CS1998;CA1416;NU1507 + + en + + false + false + false + false + false + + + + + true + 21.0 + + + + + true + 14.2 + + + + + true + 10.14 + + + + + true + 14.0 + + + + + true + 10.0.18362.0 + 10.0.18362.0 + + + diff --git a/src/Directory.Build.targets b/src/Directory.Build.targets index f52f159c..0d24ec23 100644 --- a/src/Directory.Build.targets +++ b/src/Directory.Build.targets @@ -1,7 +1,2 @@ - - - - - + + \ No newline at end of file diff --git a/src/ToDo.Base/AppHead.xaml b/src/ToDo.Base/AppHead.xaml new file mode 100644 index 00000000..1ea15b50 --- /dev/null +++ b/src/ToDo.Base/AppHead.xaml @@ -0,0 +1,17 @@ + + + + + + + + + + + diff --git a/src/ToDo.Base/AppHead.xaml.cs b/src/ToDo.Base/AppHead.xaml.cs new file mode 100644 index 00000000..52fa5f59 --- /dev/null +++ b/src/ToDo.Base/AppHead.xaml.cs @@ -0,0 +1,13 @@ +namespace ToDo; + +public sealed partial class AppHead : App +{ + /// + /// Initializes the singleton application object. This is the first line of authored code + /// executed, and as such is the logical equivalent of main() or WinMain(). + /// + public AppHead() + { + this.InitializeComponent(); + } +} diff --git a/src/ToDo.Base/Icons/appconfig.svg b/src/ToDo.Base/Icons/appconfig.svg new file mode 100644 index 00000000..3106b1a8 --- /dev/null +++ b/src/ToDo.Base/Icons/appconfig.svg @@ -0,0 +1,137 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/ToDo.Base/Icons/iconapp.svg b/src/ToDo.Base/Icons/iconapp.svg new file mode 100644 index 00000000..f621ea59 --- /dev/null +++ b/src/ToDo.Base/Icons/iconapp.svg @@ -0,0 +1,42 @@ + + + + + + diff --git a/src/ToDo.Base/Splash/splash_screen.svg b/src/ToDo.Base/Splash/splash_screen.svg new file mode 100644 index 00000000..3106b1a8 --- /dev/null +++ b/src/ToDo.Base/Splash/splash_screen.svg @@ -0,0 +1,137 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/ToDo.Base/base.props b/src/ToDo.Base/base.props new file mode 100644 index 00000000..979f0902 --- /dev/null +++ b/src/ToDo.Base/base.props @@ -0,0 +1,22 @@ + + + + + + + + + diff --git a/src/ToDo.Mobile/Android/AndroidManifest.xml b/src/ToDo.Mobile/Android/AndroidManifest.xml index a3bfccd1..024a5be3 100644 --- a/src/ToDo.Mobile/Android/AndroidManifest.xml +++ b/src/ToDo.Mobile/Android/AndroidManifest.xml @@ -1,18 +1,20 @@ - + + - - - - - - - - - - + + + + + + + + + + + diff --git a/src/ToDo.Mobile/Android/Main.Android.cs b/src/ToDo.Mobile/Android/Main.Android.cs index cc8ee3e2..ce477fff 100644 --- a/src/ToDo.Mobile/Android/Main.Android.cs +++ b/src/ToDo.Mobile/Android/Main.Android.cs @@ -1,3 +1,7 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; using Android.App; using Android.Content; using Android.OS; @@ -6,10 +10,6 @@ using Android.Widget; using Com.Nostra13.Universalimageloader.Core; using Microsoft.UI.Xaml.Media; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; namespace ToDo.Droid { @@ -24,12 +24,12 @@ namespace ToDo.Droid public class Application : Microsoft.UI.Xaml.NativeApplication { public Application(IntPtr javaReference, JniHandleOwnership transfer) - : base(() => new App(), javaReference, transfer) + : base(() => new AppHead(), javaReference, transfer) { ConfigureUniversalImageLoader(); } - private void ConfigureUniversalImageLoader() + private static void ConfigureUniversalImageLoader() { // Create global configuration and initialize ImageLoader with this config ImageLoaderConfiguration config = new ImageLoaderConfiguration diff --git a/src/ToDo.Mobile/Android/MainActivity.Android.cs b/src/ToDo.Mobile/Android/MainActivity.Android.cs index 4c3e1f4d..3d09ec37 100644 --- a/src/ToDo.Mobile/Android/MainActivity.Android.cs +++ b/src/ToDo.Mobile/Android/MainActivity.Android.cs @@ -6,13 +6,13 @@ using Android.Widget; using Microsoft.Identity.Client; -namespace ToDo +namespace ToDo.Droid { [Activity( - MainLauncher = true, - ConfigurationChanges = global::Uno.UI.ActivityHelper.AllConfigChanges, - WindowSoftInputMode = SoftInput.AdjustPan | SoftInput.StateHidden - )] + MainLauncher = true, + ConfigurationChanges = global::Uno.UI.ActivityHelper.AllConfigChanges, + WindowSoftInputMode = SoftInput.AdjustPan | SoftInput.StateHidden + )] public class MainActivity : Microsoft.UI.Xaml.ApplicationActivity { protected override void OnActivityResult(int requestCode, Result resultCode, Intent data) @@ -23,4 +23,3 @@ protected override void OnActivityResult(int requestCode, Result resultCode, Int } } } - diff --git a/src/ToDo.Mobile/Android/Resources/values/Strings.xml b/src/ToDo.Mobile/Android/Resources/values/Strings.xml index e4cb66d3..d273def9 100644 --- a/src/ToDo.Mobile/Android/Resources/values/Strings.xml +++ b/src/ToDo.Mobile/Android/Resources/values/Strings.xml @@ -1,5 +1,5 @@ - Hello World, Click Me! - ToDo + Hello World, Click Me! + ToDo diff --git a/src/ToDo.Mobile/Android/Resources/values/Styles.xml b/src/ToDo.Mobile/Android/Resources/values/Styles.xml index 2aeb92cc..d4076088 100644 --- a/src/ToDo.Mobile/Android/Resources/values/Styles.xml +++ b/src/ToDo.Mobile/Android/Resources/values/Styles.xml @@ -11,7 +11,7 @@ @drawable/splash - + diff --git a/src/ToDo.UI/Styles/NavigationView.xaml b/src/ToDo/Styles/NavigationView.xaml similarity index 100% rename from src/ToDo.UI/Styles/NavigationView.xaml rename to src/ToDo/Styles/NavigationView.xaml diff --git a/src/ToDo/ToDo.csproj b/src/ToDo/ToDo.csproj index 353fe183..04a2e9a8 100644 --- a/src/ToDo/ToDo.csproj +++ b/src/ToDo/ToDo.csproj @@ -1,46 +1,82 @@ - + - netstandard2.0 - enable + net7.0 + $(TargetFrameworks);net7.0-windows10.0.19041 + $(TargetFrameworks);net7.0-ios;net7.0-android;net7.0-maccatalyst + + + true + + + + win10-x64;win10-x86 + - - - + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - + + + + + + + + + + + + + %(Filename) + + + + + + + + + + + - \ No newline at end of file + diff --git a/src/ToDo/Views/Dialogs/AddListFlyout.xaml b/src/ToDo/Views/Dialogs/AddListFlyout.xaml new file mode 100644 index 00000000..f840d13e --- /dev/null +++ b/src/ToDo/Views/Dialogs/AddListFlyout.xaml @@ -0,0 +1,67 @@ + + + + F1 M 14 8 L 8 8 L 8 14 L 6 14 L 6 8 L 0 8 L 0 6 L 6 6 L 6 0 L 8 0 L 8 6 L 14 6 L 14 8 Z + + + + + + + + + + + + + + + + + diff --git a/src/ToDo.UI/Views/Dialogs/AddListFlyout.xaml.cs b/src/ToDo/Views/Dialogs/AddListFlyout.xaml.cs similarity index 100% rename from src/ToDo.UI/Views/Dialogs/AddListFlyout.xaml.cs rename to src/ToDo/Views/Dialogs/AddListFlyout.xaml.cs diff --git a/src/ToDo.UI/Views/Dialogs/AddTaskFlyout.xaml b/src/ToDo/Views/Dialogs/AddTaskFlyout.xaml similarity index 89% rename from src/ToDo.UI/Views/Dialogs/AddTaskFlyout.xaml rename to src/ToDo/Views/Dialogs/AddTaskFlyout.xaml index 95e9ad1d..badffb1c 100644 --- a/src/ToDo.UI/Views/Dialogs/AddTaskFlyout.xaml +++ b/src/ToDo/Views/Dialogs/AddTaskFlyout.xaml @@ -9,7 +9,7 @@ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" mc:Ignorable="d" - Background="{ThemeResource BackgroundBrush}"> + Background="{ThemeResource SurfaceBrush}"> + Style="{ThemeResource FilledTextBoxStyle}" /> @@ -39,7 +39,7 @@ Content="Cancel" uen:Navigation.Request="-" utu:AutoLayout.CounterAlignment="Start" - Style="{StaticResource TextButtonStyle}" /> + Style="{ThemeResource TextButtonStyle}" /> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/ToDo/Views/HomePage.xaml.cs b/src/ToDo/Views/HomePage.xaml.cs new file mode 100644 index 00000000..7b43bd86 --- /dev/null +++ b/src/ToDo/Views/HomePage.xaml.cs @@ -0,0 +1,32 @@ +namespace ToDo.Views; + +public sealed partial class HomePage : Page +{ + public HomePage() + { + this.InitializeComponent(); + + NavView.SizeChanged += HomePage_SizeChanged; + } + + private bool? LastIsWide { get; set; } + + private void HomePage_SizeChanged(object sender, SizeChangedEventArgs args) + { + // TODO: fix the Current Actual size handling + //var isWide = (App.Current as App)?.Window?.Content?.ActualSize.X > (double)App.Current.Resources[ResourceKeys.WideMinWindowWidth]; + //if (!LastIsWide.HasValue || LastIsWide.Value != isWide) + //{ + // LastIsWide = isWide; + // if (isWide) + // { + // var binding = new Binding() { Path = new PropertyPath("SelectedList.Value") }; + // NavView.SetBinding(NavigationView.SelectedItemProperty, binding); + // } + // else + // { + // NavView.ClearValue(NavigationView.SelectedItemProperty); + // } + //} + } +} diff --git a/src/ToDo.UI/Views/SearchPage.xaml b/src/ToDo/Views/SearchPage.xaml similarity index 99% rename from src/ToDo.UI/Views/SearchPage.xaml rename to src/ToDo/Views/SearchPage.xaml index 4141f31b..43eb51ff 100644 --- a/src/ToDo.UI/Views/SearchPage.xaml +++ b/src/ToDo/Views/SearchPage.xaml @@ -10,7 +10,7 @@ xmlns:utu="using:Uno.Toolkit.UI" xmlns:um="using:Uno.Material" mc:Ignorable="d" - Background="{ThemeResource BackgroundBrush}"> + Background="{ThemeResource SurfaceBrush}"> F1 M 16 7 L 3.8299999237060547 7 L 9.420000076293945 1.4099998474121094 L 8 0 L 0 8 L 8 16 L 9.40999984741211 14.59000015258789 L 3.8299999237060547 9 L 16 9 L 16 7 Z diff --git a/src/ToDo.UI/Views/SearchPage.xaml.cs b/src/ToDo/Views/SearchPage.xaml.cs similarity index 100% rename from src/ToDo.UI/Views/SearchPage.xaml.cs rename to src/ToDo/Views/SearchPage.xaml.cs diff --git a/src/ToDo/Views/Shell.xaml b/src/ToDo/Views/Shell.xaml new file mode 100644 index 00000000..326004d2 --- /dev/null +++ b/src/ToDo/Views/Shell.xaml @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + + + + diff --git a/src/ToDo.UI/Views/Shell.xaml.cs b/src/ToDo/Views/Shell.xaml.cs similarity index 100% rename from src/ToDo.UI/Views/Shell.xaml.cs rename to src/ToDo/Views/Shell.xaml.cs diff --git a/src/ToDo.UI/Views/TaskListPage.xaml b/src/ToDo/Views/TaskListPage.xaml similarity index 68% rename from src/ToDo.UI/Views/TaskListPage.xaml rename to src/ToDo/Views/TaskListPage.xaml index c92fc8c5..fb938ea6 100644 --- a/src/ToDo.UI/Views/TaskListPage.xaml +++ b/src/ToDo/Views/TaskListPage.xaml @@ -1,17 +1,17 @@  + xmlns:utu="using:Uno.Toolkit.UI" + NavigationCacheMode="Required" + mc:Ignorable="d"> F1 M 14 8 L 8 8 L 8 14 L 6 14 L 6 8 L 0 8 L 0 6 L 6 6 L 6 0 L 8 0 L 8 6 L 14 6 L 14 8 Z @@ -19,26 +19,23 @@ F1 M 15.40999984741211 1.7950000762939453 L 14.200000762939453 0.5849999785423279 C 13.420000791549683 -0.19499999284744263 12.149999856948853 -0.19499999284744263 11.369999885559082 0.5849999785423279 L 8.6899995803833 3.2649998664855957 L 0 11.954999923706055 L 0 15.994999885559082 L 4.039999961853027 15.994999885559082 L 12.779999732971191 7.255000114440918 L 15.40999984741211 4.625 C 16.19999986886978 3.8450000286102295 16.19999986886978 2.575000047683716 15.40999984741211 1.7950000762939453 L 15.40999984741211 1.7950000762939453 Z M 3.2100000381469727 13.994999885559082 L 2 13.994999885559082 L 2 12.785000801086426 L 10.65999984741211 4.125 L 11.869999885559082 5.335000038146973 L 3.2100000381469727 13.994999885559082 Z M 8 15.994999885559082 L 12 11.994999885559082 L 18 11.994999885559082 L 18 15.994999885559082 L 8 15.994999885559082 Z F1 M 12.430000305175781 8 L 10 0 L 7.569999694824219 8 L 0 8 L 6.180000305175781 12.40999984741211 L 3.8299999237060547 20 L 10 15.309999465942383 L 16.18000030517578 20 L 13.829999923706055 12.40999984741211 L 20 8 L 12.430000305175781 8 Z - - - - + + DefaultValue="{ThemeResource PrimaryVariantLightBrush}" + ImportantValue="{ThemeResource ErrorBrush}" + TasksValue="{ThemeResource PrimaryVariantLightBrush}" /> + TasksValue="Collapsed" />