From 744d18a9d81ab76fdc90133f5fd2d24e6469ae5e Mon Sep 17 00:00:00 2001 From: LucDeCaf Date: Tue, 7 Jul 2026 14:58:08 +0200 Subject: [PATCH 1/4] Scaffold --- demos/UnoTodo/.editorconfig | 167 ++++++ demos/UnoTodo/.gitignore | 492 ++++++++++++++++++ demos/UnoTodo/.run/Readme.md | 3 + demos/UnoTodo/.run/UnoTodo.run.xml | 47 ++ demos/UnoTodo/Directory.Build.props | 15 + demos/UnoTodo/Directory.Build.targets | 2 + demos/UnoTodo/Directory.Packages.props | 10 + demos/UnoTodo/UnoTodo.sln | 89 ++++ demos/UnoTodo/UnoTodo/App.xaml | 29 ++ demos/UnoTodo/UnoTodo/App.xaml.cs | 103 ++++ demos/UnoTodo/UnoTodo/Assets/Icons/icon.svg | 42 ++ .../UnoTodo/Assets/Icons/icon_foreground.svg | 137 +++++ demos/UnoTodo/UnoTodo/Assets/SharedAssets.md | 32 ++ .../UnoTodo/Assets/Splash/splash_screen.svg | 137 +++++ demos/UnoTodo/UnoTodo/GlobalUsings.cs | 10 + demos/UnoTodo/UnoTodo/Models/AppConfig.cs | 6 + demos/UnoTodo/UnoTodo/Models/Entity.cs | 3 + demos/UnoTodo/UnoTodo/Package.appxmanifest | 31 ++ .../Platforms/Android/AndroidManifest.xml | 4 + .../Platforms/Android/Assets/AboutAssets.txt | 22 + .../UnoTodo/Platforms/Android/Main.Android.cs | 30 ++ .../Platforms/Android/MainActivity.Android.cs | 23 + .../Android/Resources/AboutResources.txt | 47 ++ .../Android/Resources/values/Strings.xml | 5 + .../Android/Resources/values/Styles.xml | 25 + .../Platforms/Android/environment.conf | 2 + .../UnoTodo/Platforms/Desktop/Program.cs | 21 + .../Platforms/WebAssembly/LinkerConfig.xml | 10 + .../UnoTodo/Platforms/WebAssembly/Program.cs | 16 + .../Platforms/WebAssembly/WasmCSS/Fonts.css | 28 + .../WebAssembly/WasmScripts/AppManifest.js | 3 + .../WebAssembly/manifest.webmanifest | 10 + .../wwwroot/staticwebapp.config.json | 30 ++ .../Platforms/WebAssembly/wwwroot/web.config | 78 +++ .../UnoTodo/Platforms/iOS/Entitlements.plist | 6 + .../UnoTodo/UnoTodo/Platforms/iOS/Info.plist | 43 ++ .../UnoTodo/UnoTodo/Platforms/iOS/Main.iOS.cs | 18 + .../LaunchImages.launchimage/Contents.json | 58 +++ .../Platforms/iOS/PrivacyInfo.xcprivacy | 41 ++ .../UnoTodo/UnoTodo/Presentation/MainModel.cs | 28 + .../UnoTodo/Presentation/MainPage.xaml | 30 ++ .../UnoTodo/Presentation/MainPage.xaml.cs | 9 + .../UnoTodo/Presentation/SecondModel.cs | 5 + .../UnoTodo/Presentation/SecondPage.xaml | 28 + .../UnoTodo/Presentation/SecondPage.xaml.cs | 10 + demos/UnoTodo/UnoTodo/Presentation/Shell.xaml | 36 ++ .../UnoTodo/Presentation/Shell.xaml.cs | 10 + .../UnoTodo/Presentation/ShellModel.cs | 13 + .../PublishProfiles/win-arm64.pubxml | 18 + .../Properties/PublishProfiles/win-x64.pubxml | 18 + .../Properties/PublishProfiles/win-x86.pubxml | 23 + .../UnoTodo/Properties/launchSettings.json | 41 ++ demos/UnoTodo/UnoTodo/ReadMe.md | 7 + .../UnoTodo/UnoTodo/Strings/en/Resources.resw | 123 +++++ .../UnoTodo/UnoTodo/Strings/es/Resources.resw | 123 +++++ .../UnoTodo/UnoTodo/Strings/fr/Resources.resw | 123 +++++ .../UnoTodo/Strings/pt-BR/Resources.resw | 123 +++++ .../UnoTodo/Styles/ColorPaletteOverride.json | 76 +++ .../UnoTodo/Styles/ColorPaletteOverride.xaml | 65 +++ demos/UnoTodo/UnoTodo/UnoTodo.csproj | 39 ++ demos/UnoTodo/UnoTodo/app.manifest | 25 + .../UnoTodo/appsettings.development.json | 5 + demos/UnoTodo/UnoTodo/appsettings.json | 13 + demos/UnoTodo/global.json | 9 + 64 files changed, 2875 insertions(+) create mode 100644 demos/UnoTodo/.editorconfig create mode 100644 demos/UnoTodo/.gitignore create mode 100644 demos/UnoTodo/.run/Readme.md create mode 100644 demos/UnoTodo/.run/UnoTodo.run.xml create mode 100644 demos/UnoTodo/Directory.Build.props create mode 100644 demos/UnoTodo/Directory.Build.targets create mode 100644 demos/UnoTodo/Directory.Packages.props create mode 100644 demos/UnoTodo/UnoTodo.sln create mode 100644 demos/UnoTodo/UnoTodo/App.xaml create mode 100644 demos/UnoTodo/UnoTodo/App.xaml.cs create mode 100644 demos/UnoTodo/UnoTodo/Assets/Icons/icon.svg create mode 100644 demos/UnoTodo/UnoTodo/Assets/Icons/icon_foreground.svg create mode 100644 demos/UnoTodo/UnoTodo/Assets/SharedAssets.md create mode 100644 demos/UnoTodo/UnoTodo/Assets/Splash/splash_screen.svg create mode 100644 demos/UnoTodo/UnoTodo/GlobalUsings.cs create mode 100644 demos/UnoTodo/UnoTodo/Models/AppConfig.cs create mode 100644 demos/UnoTodo/UnoTodo/Models/Entity.cs create mode 100644 demos/UnoTodo/UnoTodo/Package.appxmanifest create mode 100644 demos/UnoTodo/UnoTodo/Platforms/Android/AndroidManifest.xml create mode 100644 demos/UnoTodo/UnoTodo/Platforms/Android/Assets/AboutAssets.txt create mode 100644 demos/UnoTodo/UnoTodo/Platforms/Android/Main.Android.cs create mode 100644 demos/UnoTodo/UnoTodo/Platforms/Android/MainActivity.Android.cs create mode 100644 demos/UnoTodo/UnoTodo/Platforms/Android/Resources/AboutResources.txt create mode 100644 demos/UnoTodo/UnoTodo/Platforms/Android/Resources/values/Strings.xml create mode 100644 demos/UnoTodo/UnoTodo/Platforms/Android/Resources/values/Styles.xml create mode 100644 demos/UnoTodo/UnoTodo/Platforms/Android/environment.conf create mode 100644 demos/UnoTodo/UnoTodo/Platforms/Desktop/Program.cs create mode 100644 demos/UnoTodo/UnoTodo/Platforms/WebAssembly/LinkerConfig.xml create mode 100644 demos/UnoTodo/UnoTodo/Platforms/WebAssembly/Program.cs create mode 100644 demos/UnoTodo/UnoTodo/Platforms/WebAssembly/WasmCSS/Fonts.css create mode 100644 demos/UnoTodo/UnoTodo/Platforms/WebAssembly/WasmScripts/AppManifest.js create mode 100644 demos/UnoTodo/UnoTodo/Platforms/WebAssembly/manifest.webmanifest create mode 100644 demos/UnoTodo/UnoTodo/Platforms/WebAssembly/wwwroot/staticwebapp.config.json create mode 100644 demos/UnoTodo/UnoTodo/Platforms/WebAssembly/wwwroot/web.config create mode 100644 demos/UnoTodo/UnoTodo/Platforms/iOS/Entitlements.plist create mode 100644 demos/UnoTodo/UnoTodo/Platforms/iOS/Info.plist create mode 100644 demos/UnoTodo/UnoTodo/Platforms/iOS/Main.iOS.cs create mode 100644 demos/UnoTodo/UnoTodo/Platforms/iOS/Media.xcassets/LaunchImages.launchimage/Contents.json create mode 100644 demos/UnoTodo/UnoTodo/Platforms/iOS/PrivacyInfo.xcprivacy create mode 100644 demos/UnoTodo/UnoTodo/Presentation/MainModel.cs create mode 100644 demos/UnoTodo/UnoTodo/Presentation/MainPage.xaml create mode 100644 demos/UnoTodo/UnoTodo/Presentation/MainPage.xaml.cs create mode 100644 demos/UnoTodo/UnoTodo/Presentation/SecondModel.cs create mode 100644 demos/UnoTodo/UnoTodo/Presentation/SecondPage.xaml create mode 100644 demos/UnoTodo/UnoTodo/Presentation/SecondPage.xaml.cs create mode 100644 demos/UnoTodo/UnoTodo/Presentation/Shell.xaml create mode 100644 demos/UnoTodo/UnoTodo/Presentation/Shell.xaml.cs create mode 100644 demos/UnoTodo/UnoTodo/Presentation/ShellModel.cs create mode 100644 demos/UnoTodo/UnoTodo/Properties/PublishProfiles/win-arm64.pubxml create mode 100644 demos/UnoTodo/UnoTodo/Properties/PublishProfiles/win-x64.pubxml create mode 100644 demos/UnoTodo/UnoTodo/Properties/PublishProfiles/win-x86.pubxml create mode 100644 demos/UnoTodo/UnoTodo/Properties/launchSettings.json create mode 100644 demos/UnoTodo/UnoTodo/ReadMe.md create mode 100644 demos/UnoTodo/UnoTodo/Strings/en/Resources.resw create mode 100644 demos/UnoTodo/UnoTodo/Strings/es/Resources.resw create mode 100644 demos/UnoTodo/UnoTodo/Strings/fr/Resources.resw create mode 100644 demos/UnoTodo/UnoTodo/Strings/pt-BR/Resources.resw create mode 100644 demos/UnoTodo/UnoTodo/Styles/ColorPaletteOverride.json create mode 100644 demos/UnoTodo/UnoTodo/Styles/ColorPaletteOverride.xaml create mode 100644 demos/UnoTodo/UnoTodo/UnoTodo.csproj create mode 100644 demos/UnoTodo/UnoTodo/app.manifest create mode 100644 demos/UnoTodo/UnoTodo/appsettings.development.json create mode 100644 demos/UnoTodo/UnoTodo/appsettings.json create mode 100644 demos/UnoTodo/global.json diff --git a/demos/UnoTodo/.editorconfig b/demos/UnoTodo/.editorconfig new file mode 100644 index 0000000..ee73562 --- /dev/null +++ b/demos/UnoTodo/.editorconfig @@ -0,0 +1,167 @@ +; This file is for unifying the coding style for different editors and IDEs. +; More information at http://editorconfig.org + +# This file is the top-most EditorConfig file +root = true + +########################################## +# Common Settings +########################################## + +[*] +indent_style = space +end_of_line = crlf +trim_trailing_whitespace = true +insert_final_newline = true +charset = utf-8 + +########################################## +# File Extension Settings +########################################## + +[*.{yml,yaml}] +indent_size = 2 + +[.vsconfig] +indent_size = 2 +end_of_line = lf + +[*.sln] +indent_style = tab +indent_size = 2 + +[*.{csproj,proj,projitems,shproj}] +indent_size = 4 + +[*.{json,slnf}] +indent_size = 2 +end_of_line = lf + +[*.{props,targets}] +indent_size = 4 + +[*.xaml] +indent_size = 4 +charset = utf-8-bom + +[*.xml] +indent_size = 4 +end_of_line = lf + +[*.plist] +indent_size = 4 +indent_style = tab +end_of_line = lf + +[*.manifest] +indent_size = 4 + +[*.appxmanifest] +indent_size = 4 + +[*.{json,css,webmanifest}] +indent_size = 2 +end_of_line = lf + +[web.config] +indent_size = 4 +end_of_line = lf + +[*.sh] +indent_size = 2 +end_of_line = lf + +[*.cs] +# EOL should be normalized by Git. See https://github.com/dotnet/format/issues/1099 +end_of_line = unset + +# See https://github.com/dotnet/roslyn/issues/20356#issuecomment-310143926 +trim_trailing_whitespace = false + +tab_width = 4 +indent_size = 4 + +# Sort using and Import directives with System.* appearing first +dotnet_sort_system_directives_first = true + +# Avoid "this." and "Me." if not necessary +dotnet_style_qualification_for_field = false:suggestion +dotnet_style_qualification_for_property = false:suggestion +dotnet_style_qualification_for_method = false:suggestion +dotnet_style_qualification_for_event = false:suggestion + +#### Naming styles #### + +# Naming rules + +dotnet_naming_rule.interface_should_be_begins_with_i.severity = suggestion +dotnet_naming_rule.interface_should_be_begins_with_i.symbols = interface +dotnet_naming_rule.interface_should_be_begins_with_i.style = begins_with_i + +dotnet_naming_rule.types_should_be_pascal_case.severity = suggestion +dotnet_naming_rule.types_should_be_pascal_case.symbols = types +dotnet_naming_rule.types_should_be_pascal_case.style = pascal_case + +dotnet_naming_rule.non_field_members_should_be_pascal_case.severity = suggestion +dotnet_naming_rule.non_field_members_should_be_pascal_case.symbols = non_field_members +dotnet_naming_rule.non_field_members_should_be_pascal_case.style = pascal_case + +# Symbol specifications + +dotnet_naming_symbols.interface.applicable_kinds = interface +dotnet_naming_symbols.interface.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected +dotnet_naming_symbols.interface.required_modifiers = + +dotnet_naming_symbols.types.applicable_kinds = class, struct, interface, enum +dotnet_naming_symbols.types.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected +dotnet_naming_symbols.types.required_modifiers = + +dotnet_naming_symbols.non_field_members.applicable_kinds = property, event, method +dotnet_naming_symbols.non_field_members.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected +dotnet_naming_symbols.non_field_members.required_modifiers = + +# Naming styles + +dotnet_naming_style.begins_with_i.required_prefix = I +dotnet_naming_style.begins_with_i.required_suffix = +dotnet_naming_style.begins_with_i.word_separator = +dotnet_naming_style.begins_with_i.capitalization = pascal_case + +dotnet_naming_style.pascal_case.required_prefix = +dotnet_naming_style.pascal_case.required_suffix = +dotnet_naming_style.pascal_case.word_separator = +dotnet_naming_style.pascal_case.capitalization = pascal_case + +dotnet_naming_style.pascal_case.required_prefix = +dotnet_naming_style.pascal_case.required_suffix = +dotnet_naming_style.pascal_case.word_separator = +dotnet_naming_style.pascal_case.capitalization = pascal_case +dotnet_style_operator_placement_when_wrapping = beginning_of_line +dotnet_style_coalesce_expression = true:suggestion +dotnet_style_null_propagation = true:suggestion +dotnet_style_prefer_is_null_check_over_reference_equality_method = true:suggestion +dotnet_style_prefer_auto_properties = true:silent +dotnet_style_object_initializer = true:suggestion +dotnet_style_collection_initializer = true:suggestion +dotnet_style_prefer_simplified_boolean_expressions = true:suggestion +dotnet_style_prefer_conditional_expression_over_assignment = true:silent +dotnet_style_prefer_conditional_expression_over_return = true:silent +dotnet_style_explicit_tuple_names = true:suggestion +dotnet_style_prefer_inferred_tuple_names = true:suggestion + +csharp_indent_labels = one_less_than_current +csharp_using_directive_placement = outside_namespace:silent +csharp_prefer_simple_using_statement = true:suggestion +csharp_prefer_braces = true:silent +csharp_style_namespace_declarations = file_scoped:warning +csharp_style_prefer_method_group_conversion = true:silent +csharp_style_prefer_top_level_statements = true:silent +csharp_style_prefer_primary_constructors = true:suggestion +csharp_style_expression_bodied_methods = false:silent +csharp_style_expression_bodied_constructors = false:silent +csharp_style_expression_bodied_operators = false:silent +csharp_style_expression_bodied_properties = true:silent +csharp_style_expression_bodied_indexers = true:silent +csharp_style_expression_bodied_accessors = true:silent +csharp_style_expression_bodied_lambdas = true:silent +csharp_style_expression_bodied_local_functions = false:silent diff --git a/demos/UnoTodo/.gitignore b/demos/UnoTodo/.gitignore new file mode 100644 index 0000000..2ac62c0 --- /dev/null +++ b/demos/UnoTodo/.gitignore @@ -0,0 +1,492 @@ +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. +## +## Get latest from `dotnet new gitignore` + +# dotenv files +.env + +# User-specific files +*.rsuser +*.suo +*.user +*.userosscache +*.sln.docstates + +# User-specific files (MonoDevelop/Xamarin Studio) +*.userprefs + +# Mono auto generated files +mono_crash.* + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ +x64/ +x86/ +[Ww][Ii][Nn]32/ +[Aa][Rr][Mm]/ +[Aa][Rr][Mm]64/ +bld/ +[Bb]in/ +[Oo]bj/ +[Ll]og/ +[Ll]ogs/ + +# Visual Studio 2015/2017 cache/options directory +.vs/ +# Uncomment if you have tasks that create the project's static files in wwwroot +#wwwroot/ + +# Visual Studio 2017 auto generated files +Generated\ Files/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +# NUnit +*.VisualState.xml +TestResult.xml +nunit-*.xml + +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c + +# Benchmark Results +BenchmarkDotNet.Artifacts/ + +# .NET +project.lock.json +project.fragment.lock.json +artifacts/ + +# Tye +.tye/ + +# ASP.NET Scaffolding +ScaffoldingReadMe.txt + +# StyleCop +StyleCopReport.xml + +# Files built by Visual Studio +*_i.c +*_p.c +*_h.h +*.ilk +*.meta +*.obj +*.iobj +*.pch +*.pdb +*.ipdb +*.pgc +*.pgd +*.rsp +# but not Directory.Build.rsp, as it configures directory-level build defaults +!Directory.Build.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*_wpftmp.csproj +*.log +*.tlog +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# Chutzpah Test files +_Chutzpah* + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opendb +*.opensdf +*.sdf +*.cachefile +*.VC.db +*.VC.VC.opendb + +# Visual Studio profiler +*.psess +*.vsp +*.vspx +*.sap + +# Visual Studio Trace Files +*.e2e +# but not directories ending in .e2e +!*.e2e/ + +# TFS 2012 Local Workspace +$tf/ + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# AxoCover is a Code Coverage Tool +.axoCover/* +!.axoCover/settings.json + +# Coverlet is a free, cross platform Code Coverage Tool +coverage*.json +coverage*.xml +coverage*.info + +# Visual Studio code coverage results +*.coverage +*.coveragexml + +# NCrunch +_NCrunch_* +.*crunch*.local.xml +nCrunchTemp_* + +# MightyMoose +*.mm.* +AutoTest.Net/ + +# Web workbench (sass) +.sass-cache/ + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.[Pp]ublish.xml +*.azurePubxml +# Note: Comment the next line if you want to checkin your web deploy settings, +# but database connection strings (with potential passwords) will be unencrypted +*.pubxml +*.publishproj + +# Microsoft Azure Web App publish settings. Comment the next line if you want to +# checkin your Azure Web App publish settings, but sensitive information contained +# in these scripts will be unencrypted +PublishScripts/ + +# NuGet Packages +*.nupkg +# NuGet Symbol Packages +*.snupkg +# The packages folder can be ignored because of Package Restore +**/[Pp]ackages/* +# except build/, which is used as an MSBuild target. +!**/[Pp]ackages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/[Pp]ackages/repositories.config +# NuGet v3's project.json files produces more ignorable files +*.nuget.props +*.nuget.targets + +# Microsoft Azure Build Output +csx/ +*.build.csdef + +# Microsoft Azure Emulator +ecf/ +rcf/ + +# Windows Store app package directories and files +AppPackages/ +BundleArtifacts/ +Package.StoreAssociation.xml +_pkginfo.txt +*.appx +*.appxbundle +*.appxupload + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!?*.[Cc]ache/ + +# Others +ClientBin/ +~$* +*~ +*.dbmdl +*.dbproj.schemaview +*.jfm +*.pfx +*.publishsettings +orleans.codegen.cs + +# Including strong name files can present a security risk +# (https://github.com/github/gitignore/pull/2483#issue-259490424) +#*.snk + +# Since there are multiple workflows, uncomment next line to ignore bower_components +# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) +#bower_components/ + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm +ServiceFabricBackup/ +*.rptproj.bak + +# SQL Server files +*.mdf +*.ldf +*.ndf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings +*.rptproj.rsuser +*- [Bb]ackup.rdl +*- [Bb]ackup ([0-9]).rdl +*- [Bb]ackup ([0-9][0-9]).rdl + +# Microsoft Fakes +FakesAssemblies/ + +# GhostDoc plugin setting file +*.GhostDoc.xml + +# Node.js Tools for Visual Studio +.ntvs_analysis.dat +node_modules/ + +# Visual Studio 6 build log +*.plg + +# Visual Studio 6 workspace options file +*.opt + +# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) +*.vbw + +# Visual Studio 6 auto-generated project file (contains which files were open etc.) +*.vbp + +# Visual Studio 6 workspace and project file (working project files containing files to include in project) +*.dsw +*.dsp + +# Visual Studio 6 technical files +*.ncb +*.aps + +# Visual Studio LightSwitch build output +**/*.HTMLClient/GeneratedArtifacts +**/*.DesktopClient/GeneratedArtifacts +**/*.DesktopClient/ModelManifest.xml +**/*.Server/GeneratedArtifacts +**/*.Server/ModelManifest.xml +_Pvt_Extensions + +# Paket dependency manager +.paket/paket.exe +paket-files/ + +# FAKE - F# Make +.fake/ + +# CodeRush personal settings +.cr/personal + +# Python Tools for Visual Studio (PTVS) +__pycache__/ +*.pyc + +# Cake - Uncomment if you are using it +# tools/** +# !tools/packages.config + +# Tabs Studio +*.tss + +# Telerik's JustMock configuration file +*.jmconfig + +# BizTalk build output +*.btp.cs +*.btm.cs +*.odx.cs +*.xsd.cs + +# OpenCover UI analysis results +OpenCover/ + +# Azure Stream Analytics local run output +ASALocalRun/ + +# MSBuild Binary and Structured Log +*.binlog + +# NVidia Nsight GPU debugger configuration file +*.nvuser + +# MFractors (Xamarin productivity tool) working folder +.mfractor/ + +# Local History for Visual Studio +.localhistory/ + +# Visual Studio History (VSHistory) files +.vshistory/ + +# BeatPulse healthcheck temp database +healthchecksdb + +# Backup folder for Package Reference Convert tool in Visual Studio 2017 +MigrationBackup/ + +# Ionide (cross platform F# VS Code tools) working folder +.ionide/ + +# Fody - auto-generated XML schema +FodyWeavers.xsd + +# VS Code files for those working on multiple tools +.vscode/* +!.vscode/settings.json +!.vscode/tasks.json +!.vscode/launch.json +!.vscode/extensions.json +*.code-workspace + +# Official VS Code C# Dev Kit Extension exclusion +*.lscache + +# Local History for Visual Studio Code +.history/ + +# Windows Installer files from build outputs +*.cab +*.msi +*.msix +*.msm +*.msp + +# JetBrains Rider +*.sln.iml +.idea/ + +## +## Visual studio for Mac +## + + +# globs +Makefile.in +*.userprefs +*.usertasks +config.make +config.status +aclocal.m4 +install-sh +autom4te.cache/ +*.tar.gz +tarballs/ +test-results/ + +# content below from: https://github.com/github/gitignore/blob/main/Global/macOS.gitignore +# General +.DS_Store +.AppleDouble +.LSOverride + +# Icon must end with two \r +Icon + + +# Thumbnails +._* + +# Files that might appear in the root of a volume +.DocumentRevisions-V100 +.fseventsd +.Spotlight-V100 +.TemporaryItems +.Trashes +.VolumeIcon.icns +.com.apple.timemachine.donotpresent + +# Directories potentially created on remote AFP share +.AppleDB +.AppleDesktop +Network Trash Folder +Temporary Items +.apdisk + +# content below from: https://github.com/github/gitignore/blob/main/Global/Windows.gitignore +# Windows thumbnail cache files +Thumbs.db +ehthumbs.db +ehthumbs_vista.db + +# Dump file +*.stackdump + +# Folder config file +[Dd]esktop.ini + +# Recycle Bin used on file shares +$RECYCLE.BIN/ + +# Windows Installer files +*.cab +*.msi +*.msix +*.msm +*.msp + +# Windows shortcuts +*.lnk + +# Vim temporary swap files +*.swp + +# Single Target Config +solution-config.props +# Publish Profiles +!**/Properties/PublishProfiles/*.pubxml \ No newline at end of file diff --git a/demos/UnoTodo/.run/Readme.md b/demos/UnoTodo/.run/Readme.md new file mode 100644 index 0000000..6e72638 --- /dev/null +++ b/demos/UnoTodo/.run/Readme.md @@ -0,0 +1,3 @@ +# About the `.run` folder + +This folder is present to add support for the [Rider IDE](https://aka.platform.uno/rider-getstarted). You can remove this folder safely if you're not using Rider. diff --git a/demos/UnoTodo/.run/UnoTodo.run.xml b/demos/UnoTodo/.run/UnoTodo.run.xml new file mode 100644 index 0000000..1a1eed6 --- /dev/null +++ b/demos/UnoTodo/.run/UnoTodo.run.xml @@ -0,0 +1,47 @@ + + + + + + + + diff --git a/demos/UnoTodo/Directory.Build.props b/demos/UnoTodo/Directory.Build.props new file mode 100644 index 0000000..8daf569 --- /dev/null +++ b/demos/UnoTodo/Directory.Build.props @@ -0,0 +1,15 @@ + + + enable + enable + true + + + $(NoWarn);NU1507;NETSDK1201;PRI257 + + diff --git a/demos/UnoTodo/Directory.Build.targets b/demos/UnoTodo/Directory.Build.targets new file mode 100644 index 0000000..f75adf7 --- /dev/null +++ b/demos/UnoTodo/Directory.Build.targets @@ -0,0 +1,2 @@ + + diff --git a/demos/UnoTodo/Directory.Packages.props b/demos/UnoTodo/Directory.Packages.props new file mode 100644 index 0000000..2db579c --- /dev/null +++ b/demos/UnoTodo/Directory.Packages.props @@ -0,0 +1,10 @@ + + + + + diff --git a/demos/UnoTodo/UnoTodo.sln b/demos/UnoTodo/UnoTodo.sln new file mode 100644 index 0000000..b96e77c --- /dev/null +++ b/demos/UnoTodo/UnoTodo.sln @@ -0,0 +1,89 @@ +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.2.32210.308 +MinimumVisualStudioVersion = 15.0.26124.0 + +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "UnoTodo", "UnoTodo\UnoTodo.csproj", "{1EA4BEFB-BF13-48EA-ACAB-1CB4FAF859F1}" +EndProject + +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{BADA71DC-7FFD-4EDC-9F28-FB74AEADC713}" + ProjectSection(SolutionItems) = preProject + .editorconfig = .editorconfig + .gitignore = .gitignore + .vsconfig = .vsconfig + Directory.Build.props = Directory.Build.props + Directory.Build.targets = Directory.Build.targets + Directory.Packages.props = Directory.Packages.props + global.json = global.json + EndProjectSection +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Debug|ARM = Debug|ARM + Debug|ARM64 = Debug|ARM64 + Debug|iPhone = Debug|iPhone + Debug|iPhoneSimulator = Debug|iPhoneSimulator + Debug|x64 = Debug|x64 + Debug|x86 = Debug|x86 + Release|Any CPU = Release|Any CPU + Release|ARM = Release|ARM + Release|ARM64 = Release|ARM64 + Release|iPhone = Release|iPhone + Release|iPhoneSimulator = Release|iPhoneSimulator + Release|x64 = Release|x64 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {1EA4BEFB-BF13-48EA-ACAB-1CB4FAF859F1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1EA4BEFB-BF13-48EA-ACAB-1CB4FAF859F1}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1EA4BEFB-BF13-48EA-ACAB-1CB4FAF859F1}.Debug|Any CPU.Deploy.0 = Debug|Any CPU + {1EA4BEFB-BF13-48EA-ACAB-1CB4FAF859F1}.Debug|ARM.ActiveCfg = Debug|Any CPU + {1EA4BEFB-BF13-48EA-ACAB-1CB4FAF859F1}.Debug|ARM.Build.0 = Debug|Any CPU + {1EA4BEFB-BF13-48EA-ACAB-1CB4FAF859F1}.Debug|ARM.Deploy.0 = Debug|Any CPU + {1EA4BEFB-BF13-48EA-ACAB-1CB4FAF859F1}.Debug|ARM64.ActiveCfg = Debug|Any CPU + {1EA4BEFB-BF13-48EA-ACAB-1CB4FAF859F1}.Debug|ARM64.Build.0 = Debug|Any CPU + {1EA4BEFB-BF13-48EA-ACAB-1CB4FAF859F1}.Debug|ARM64.Deploy.0 = Debug|Any CPU + {1EA4BEFB-BF13-48EA-ACAB-1CB4FAF859F1}.Debug|iPhone.ActiveCfg = Debug|Any CPU + {1EA4BEFB-BF13-48EA-ACAB-1CB4FAF859F1}.Debug|iPhone.Build.0 = Debug|Any CPU + {1EA4BEFB-BF13-48EA-ACAB-1CB4FAF859F1}.Debug|iPhone.Deploy.0 = Debug|Any CPU + {1EA4BEFB-BF13-48EA-ACAB-1CB4FAF859F1}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU + {1EA4BEFB-BF13-48EA-ACAB-1CB4FAF859F1}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU + {1EA4BEFB-BF13-48EA-ACAB-1CB4FAF859F1}.Debug|iPhoneSimulator.Deploy.0 = Debug|Any CPU + {1EA4BEFB-BF13-48EA-ACAB-1CB4FAF859F1}.Debug|x64.ActiveCfg = Debug|Any CPU + {1EA4BEFB-BF13-48EA-ACAB-1CB4FAF859F1}.Debug|x64.Build.0 = Debug|Any CPU + {1EA4BEFB-BF13-48EA-ACAB-1CB4FAF859F1}.Debug|x64.Deploy.0 = Debug|Any CPU + {1EA4BEFB-BF13-48EA-ACAB-1CB4FAF859F1}.Debug|x86.ActiveCfg = Debug|Any CPU + {1EA4BEFB-BF13-48EA-ACAB-1CB4FAF859F1}.Debug|x86.Build.0 = Debug|Any CPU + {1EA4BEFB-BF13-48EA-ACAB-1CB4FAF859F1}.Debug|x86.Deploy.0 = Debug|Any CPU + {1EA4BEFB-BF13-48EA-ACAB-1CB4FAF859F1}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1EA4BEFB-BF13-48EA-ACAB-1CB4FAF859F1}.Release|Any CPU.Build.0 = Release|Any CPU + {1EA4BEFB-BF13-48EA-ACAB-1CB4FAF859F1}.Release|Any CPU.Deploy.0 = Release|Any CPU + {1EA4BEFB-BF13-48EA-ACAB-1CB4FAF859F1}.Release|ARM.ActiveCfg = Release|Any CPU + {1EA4BEFB-BF13-48EA-ACAB-1CB4FAF859F1}.Release|ARM.Build.0 = Release|Any CPU + {1EA4BEFB-BF13-48EA-ACAB-1CB4FAF859F1}.Release|ARM.Deploy.0 = Release|Any CPU + {1EA4BEFB-BF13-48EA-ACAB-1CB4FAF859F1}.Release|ARM64.ActiveCfg = Release|Any CPU + {1EA4BEFB-BF13-48EA-ACAB-1CB4FAF859F1}.Release|ARM64.Build.0 = Release|Any CPU + {1EA4BEFB-BF13-48EA-ACAB-1CB4FAF859F1}.Release|ARM64.Deploy.0 = Release|Any CPU + {1EA4BEFB-BF13-48EA-ACAB-1CB4FAF859F1}.Release|iPhone.ActiveCfg = Release|Any CPU + {1EA4BEFB-BF13-48EA-ACAB-1CB4FAF859F1}.Release|iPhone.Build.0 = Release|Any CPU + {1EA4BEFB-BF13-48EA-ACAB-1CB4FAF859F1}.Release|iPhone.Deploy.0 = Release|Any CPU + {1EA4BEFB-BF13-48EA-ACAB-1CB4FAF859F1}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU + {1EA4BEFB-BF13-48EA-ACAB-1CB4FAF859F1}.Release|iPhoneSimulator.Build.0 = Release|Any CPU + {1EA4BEFB-BF13-48EA-ACAB-1CB4FAF859F1}.Release|iPhoneSimulator.Deploy.0 = Release|Any CPU + {1EA4BEFB-BF13-48EA-ACAB-1CB4FAF859F1}.Release|x64.ActiveCfg = Release|Any CPU + {1EA4BEFB-BF13-48EA-ACAB-1CB4FAF859F1}.Release|x64.Build.0 = Release|Any CPU + {1EA4BEFB-BF13-48EA-ACAB-1CB4FAF859F1}.Release|x64.Deploy.0 = Release|Any CPU + {1EA4BEFB-BF13-48EA-ACAB-1CB4FAF859F1}.Release|x86.ActiveCfg = Release|Any CPU + {1EA4BEFB-BF13-48EA-ACAB-1CB4FAF859F1}.Release|x86.Build.0 = Release|Any CPU + {1EA4BEFB-BF13-48EA-ACAB-1CB4FAF859F1}.Release|x86.Deploy.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(NestedProjects) = preSolution + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {F21461CA-ADA4-4A6D-8D4D-7344FBA1D8C2} + EndGlobalSection +EndGlobal diff --git a/demos/UnoTodo/UnoTodo/App.xaml b/demos/UnoTodo/UnoTodo/App.xaml new file mode 100644 index 0000000..b70b4c6 --- /dev/null +++ b/demos/UnoTodo/UnoTodo/App.xaml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + + + diff --git a/demos/UnoTodo/UnoTodo/App.xaml.cs b/demos/UnoTodo/UnoTodo/App.xaml.cs new file mode 100644 index 0000000..d45f2bc --- /dev/null +++ b/demos/UnoTodo/UnoTodo/App.xaml.cs @@ -0,0 +1,103 @@ +using System.Diagnostics.CodeAnalysis; +using Uno.Resizetizer; + +namespace UnoTodo; + +public partial class App : Application +{ + /// + /// 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 App() + { + this.InitializeComponent(); + } + + protected Window? MainWindow { get; private set; } + protected IHost? Host { get; private set; } + + [SuppressMessage("Trimming", "IL2026:Members annotated with 'RequiresUnreferencedCodeAttribute' require dynamic access otherwise can break functionality when trimming application code", Justification = "Uno.Extensions APIs are used in a way that is safe for trimming in this template context.")] + protected async override void OnLaunched(LaunchActivatedEventArgs args) + { + var builder = this.CreateBuilder(args) + // Add navigation support for toolkit controls such as TabBar and NavigationView + .UseToolkitNavigation() + .Configure(host => host +#if DEBUG + // Switch to Development environment when running in DEBUG + .UseEnvironment(Environments.Development) +#endif + .UseLogging(configure: (context, logBuilder) => + { + // Configure log levels for different categories of logging + logBuilder + .SetMinimumLevel( + context.HostingEnvironment.IsDevelopment() ? + LogLevel.Information : + LogLevel.Warning) + + // Default filters for core Uno Platform namespaces + .CoreLogLevel(LogLevel.Warning); + + // Uno Platform namespace filter groups + // Uncomment individual methods to see more detailed logging + //// Generic Xaml events + //logBuilder.XamlLogLevel(LogLevel.Debug); + //// Layout specific messages + //logBuilder.XamlLayoutLogLevel(LogLevel.Debug); + //// Storage messages + //logBuilder.StorageLogLevel(LogLevel.Debug); + //// Binding related messages + //logBuilder.XamlBindingLogLevel(LogLevel.Debug); + //// Binder memory references tracking + //logBuilder.BinderMemoryReferenceLogLevel(LogLevel.Debug); + //// DevServer and HotReload related + //logBuilder.HotReloadCoreLogLevel(LogLevel.Information); + //// Debug JS interop + //logBuilder.WebAssemblyLogLevel(LogLevel.Debug); + + }, enableUnoLogging: true) + .UseConfiguration(configure: configBuilder => + configBuilder + .EmbeddedSource() + .Section() + ) + // Enable localization (see appsettings.json for supported languages) + .UseLocalization() + .ConfigureServices((context, services) => + { + // TODO: Register your services + //services.AddSingleton(); + }) + .UseNavigation(ReactiveViewModelMappings.ViewModelMappings, RegisterRoutes) + ); + MainWindow = builder.Window; + + #if DEBUG + MainWindow.UseStudio(); +#endif + MainWindow.SetWindowIcon(); + + Host = await builder.NavigateAsync(); + } + + private static void RegisterRoutes(IViewRegistry views, IRouteRegistry routes) + { + views.Register( + new ViewMap(ViewModel: typeof(ShellModel)), + new ViewMap(), + new DataViewMap() + ); + + routes.Register( + new RouteMap("", View: views.FindByViewModel(), + Nested: + [ + new ("Main", View: views.FindByViewModel(), IsDefault:true), + new ("Second", View: views.FindByViewModel()), + ] + ) + ); + } +} diff --git a/demos/UnoTodo/UnoTodo/Assets/Icons/icon.svg b/demos/UnoTodo/UnoTodo/Assets/Icons/icon.svg new file mode 100644 index 0000000..a15af53 --- /dev/null +++ b/demos/UnoTodo/UnoTodo/Assets/Icons/icon.svg @@ -0,0 +1,42 @@ + + + + + + diff --git a/demos/UnoTodo/UnoTodo/Assets/Icons/icon_foreground.svg b/demos/UnoTodo/UnoTodo/Assets/Icons/icon_foreground.svg new file mode 100644 index 0000000..8ffc41a --- /dev/null +++ b/demos/UnoTodo/UnoTodo/Assets/Icons/icon_foreground.svg @@ -0,0 +1,137 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/demos/UnoTodo/UnoTodo/Assets/SharedAssets.md b/demos/UnoTodo/UnoTodo/Assets/SharedAssets.md new file mode 100644 index 0000000..b1cc4e7 --- /dev/null +++ b/demos/UnoTodo/UnoTodo/Assets/SharedAssets.md @@ -0,0 +1,32 @@ +# Shared Assets + +See documentation about assets here: https://github.com/unoplatform/uno/blob/master/doc/articles/features/working-with-assets.md + +## Here is a cheat sheet + +1. Add the image file to the `Assets` directory of a shared project. +2. Set the build action to `Content`. +3. (Recommended) Provide an asset for various scales/dpi + +### Examples + +```text +\Assets\Images\logo.scale-100.png +\Assets\Images\logo.scale-200.png +\Assets\Images\logo.scale-400.png + +\Assets\Images\scale-100\logo.png +\Assets\Images\scale-200\logo.png +\Assets\Images\scale-400\logo.png +``` + +### Table of scales + +| Scale | WinUI | iOS | Android | +|-------|:-----------:|:---------------:|:-------:| +| `100` | scale-100 | @1x | mdpi | +| `125` | scale-125 | N/A | N/A | +| `150` | scale-150 | N/A | hdpi | +| `200` | scale-200 | @2x | xhdpi | +| `300` | scale-300 | @3x | xxhdpi | +| `400` | scale-400 | N/A | xxxhdpi | diff --git a/demos/UnoTodo/UnoTodo/Assets/Splash/splash_screen.svg b/demos/UnoTodo/UnoTodo/Assets/Splash/splash_screen.svg new file mode 100644 index 0000000..8ffc41a --- /dev/null +++ b/demos/UnoTodo/UnoTodo/Assets/Splash/splash_screen.svg @@ -0,0 +1,137 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/demos/UnoTodo/UnoTodo/GlobalUsings.cs b/demos/UnoTodo/UnoTodo/GlobalUsings.cs new file mode 100644 index 0000000..673aff1 --- /dev/null +++ b/demos/UnoTodo/UnoTodo/GlobalUsings.cs @@ -0,0 +1,10 @@ +global using System.Collections.Immutable; +global using Microsoft.Extensions.DependencyInjection; +global using Microsoft.Extensions.Hosting; +global using Microsoft.Extensions.Localization; +global using Microsoft.Extensions.Logging; +global using Microsoft.Extensions.Options; +global using UnoTodo.Models; +global using UnoTodo.Presentation; +global using ApplicationExecutionState = Windows.ApplicationModel.Activation.ApplicationExecutionState; +[assembly: Uno.Extensions.Reactive.Config.BindableGenerationTool(3)] diff --git a/demos/UnoTodo/UnoTodo/Models/AppConfig.cs b/demos/UnoTodo/UnoTodo/Models/AppConfig.cs new file mode 100644 index 0000000..9c768af --- /dev/null +++ b/demos/UnoTodo/UnoTodo/Models/AppConfig.cs @@ -0,0 +1,6 @@ +namespace UnoTodo.Models; + +public record AppConfig +{ + public string? Environment { get; init; } +} diff --git a/demos/UnoTodo/UnoTodo/Models/Entity.cs b/demos/UnoTodo/UnoTodo/Models/Entity.cs new file mode 100644 index 0000000..fb30e57 --- /dev/null +++ b/demos/UnoTodo/UnoTodo/Models/Entity.cs @@ -0,0 +1,3 @@ +namespace UnoTodo.Models; + +public record Entity(string Name); diff --git a/demos/UnoTodo/UnoTodo/Package.appxmanifest b/demos/UnoTodo/UnoTodo/Package.appxmanifest new file mode 100644 index 0000000..9ef3814 --- /dev/null +++ b/demos/UnoTodo/UnoTodo/Package.appxmanifest @@ -0,0 +1,31 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/demos/UnoTodo/UnoTodo/Platforms/Android/AndroidManifest.xml b/demos/UnoTodo/UnoTodo/Platforms/Android/AndroidManifest.xml new file mode 100644 index 0000000..95ae075 --- /dev/null +++ b/demos/UnoTodo/UnoTodo/Platforms/Android/AndroidManifest.xml @@ -0,0 +1,4 @@ + + + + diff --git a/demos/UnoTodo/UnoTodo/Platforms/Android/Assets/AboutAssets.txt b/demos/UnoTodo/UnoTodo/Platforms/Android/Assets/AboutAssets.txt new file mode 100644 index 0000000..89ab409 --- /dev/null +++ b/demos/UnoTodo/UnoTodo/Platforms/Android/Assets/AboutAssets.txt @@ -0,0 +1,22 @@ +To add cross-platform image assets for your Uno Platform app, use the Assets folder +in the shared project instead. Assets in this folder are Android-only assets. + +Any raw assets you want to be deployed with your application can be placed in +this directory (and child directories) and given a Build Action of "AndroidAsset". + +These files will be deployed with your package and will be accessible using Android's +AssetManager, like this: + +public class ReadAsset : Activity +{ + protected override void OnCreate (Bundle bundle) + { + base.OnCreate (bundle); + + InputStream input = Assets.Open ("my_asset.txt"); + } +} + +Additionally, some Android functions will automatically load asset files: + +Typeface tf = Typeface.CreateFromAsset (Context.Assets, "fonts/samplefont.ttf"); diff --git a/demos/UnoTodo/UnoTodo/Platforms/Android/Main.Android.cs b/demos/UnoTodo/UnoTodo/Platforms/Android/Main.Android.cs new file mode 100644 index 0000000..3ca2b0f --- /dev/null +++ b/demos/UnoTodo/UnoTodo/Platforms/Android/Main.Android.cs @@ -0,0 +1,30 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using Android.App; +using Android.Content; +using Android.OS; +using Android.Runtime; +using Android.Views; +using Android.Widget; +using Microsoft.UI.Xaml.Media; + +namespace UnoTodo.Droid; + +[global::Android.App.ApplicationAttribute( + Label = "@string/ApplicationName", + Icon = "@mipmap/icon", + LargeHeap = true, + HardwareAccelerated = true, + Theme = "@style/Theme.App.Starting" +)] +public class Application : Microsoft.UI.Xaml.NativeApplication +{ + public Application(IntPtr javaReference, JniHandleOwnership transfer) + : base(() => new App(), javaReference, transfer) + { + } + +} + diff --git a/demos/UnoTodo/UnoTodo/Platforms/Android/MainActivity.Android.cs b/demos/UnoTodo/UnoTodo/Platforms/Android/MainActivity.Android.cs new file mode 100644 index 0000000..3b6fcf0 --- /dev/null +++ b/demos/UnoTodo/UnoTodo/Platforms/Android/MainActivity.Android.cs @@ -0,0 +1,23 @@ +using Android.App; +using Android.Content.PM; +using Android.OS; +using Android.Views; +using Android.Widget; + +namespace UnoTodo.Droid; + +[Activity( + MainLauncher = true, + ConfigurationChanges = global::Uno.UI.ActivityHelper.AllConfigChanges, + WindowSoftInputMode = SoftInput.AdjustNothing | SoftInput.StateHidden +)] +public class MainActivity : Microsoft.UI.Xaml.ApplicationActivity +{ + protected override void OnCreate(Bundle? savedInstanceState) + { + global::AndroidX.Core.SplashScreen.SplashScreen.InstallSplashScreen(this); + + base.OnCreate(savedInstanceState); + } + +} diff --git a/demos/UnoTodo/UnoTodo/Platforms/Android/Resources/AboutResources.txt b/demos/UnoTodo/UnoTodo/Platforms/Android/Resources/AboutResources.txt new file mode 100644 index 0000000..17e3b13 --- /dev/null +++ b/demos/UnoTodo/UnoTodo/Platforms/Android/Resources/AboutResources.txt @@ -0,0 +1,47 @@ +To add cross-platform image assets for your Uno Platform app, use the Assets folder +in the shared project instead. Resources in this folder are Android-only. + +Images, layout descriptions, binary blobs and string dictionaries can be included +in your application as resource files. Various Android APIs are designed to +operate on the resource IDs instead of dealing with images, strings or binary blobs +directly. + +For example, a sample Android app that contains a user interface layout (main.axml), +an internationalization string table (strings.xml) and some icons (drawable-XXX/icon.png) +would keep its resources in the "Resources" directory of the application: + +Resources/ + drawable/ + icon.png + + layout/ + main.axml + + values/ + strings.xml + +In order to get the build system to recognize Android resources, set the build action to +"AndroidResource". The native Android APIs do not operate directly with filenames, but +instead operate on resource IDs. When you compile an Android application that uses resources, +the build system will package the resources for distribution and generate a class called "R" +(this is an Android convention) that contains the tokens for each one of the resources +included. For example, for the above Resources layout, this is what the R class would expose: + +public class R { + public class drawable { + public const int icon = 0x123; + } + + public class layout { + public const int main = 0x456; + } + + public class strings { + public const int first_string = 0xabc; + public const int second_string = 0xbcd; + } +} + +You would then use R.drawable.icon to reference the drawable/icon.png file, or R.layout.main +to reference the layout/main.axml file, or R.strings.first_string to reference the first +string in the dictionary file values/strings.xml. diff --git a/demos/UnoTodo/UnoTodo/Platforms/Android/Resources/values/Strings.xml b/demos/UnoTodo/UnoTodo/Platforms/Android/Resources/values/Strings.xml new file mode 100644 index 0000000..316b6b0 --- /dev/null +++ b/demos/UnoTodo/UnoTodo/Platforms/Android/Resources/values/Strings.xml @@ -0,0 +1,5 @@ + + + Hello World, Click Me! + UnoTodo + diff --git a/demos/UnoTodo/UnoTodo/Platforms/Android/Resources/values/Styles.xml b/demos/UnoTodo/UnoTodo/Platforms/Android/Resources/values/Styles.xml new file mode 100644 index 0000000..f47dcf3 --- /dev/null +++ b/demos/UnoTodo/UnoTodo/Platforms/Android/Resources/values/Styles.xml @@ -0,0 +1,25 @@ + + + + + + + + diff --git a/demos/UnoTodo/UnoTodo/Platforms/Android/environment.conf b/demos/UnoTodo/UnoTodo/Platforms/Android/environment.conf new file mode 100644 index 0000000..d8c1064 --- /dev/null +++ b/demos/UnoTodo/UnoTodo/Platforms/Android/environment.conf @@ -0,0 +1,2 @@ +# See this for more details: http://developer.xamarin.com/guides/android/advanced_topics/garbage_collection/ +MONO_GC_PARAMS=bridge-implementation=new,nursery-size=32m,soft-heap-limit=256m \ No newline at end of file diff --git a/demos/UnoTodo/UnoTodo/Platforms/Desktop/Program.cs b/demos/UnoTodo/UnoTodo/Platforms/Desktop/Program.cs new file mode 100644 index 0000000..5f2f9ec --- /dev/null +++ b/demos/UnoTodo/UnoTodo/Platforms/Desktop/Program.cs @@ -0,0 +1,21 @@ +using Uno.UI.Hosting; + +namespace UnoTodo; + +internal class Program +{ + [STAThread] + public static void Main(string[] args) + { + + var host = UnoPlatformHostBuilder.Create() + .App(() => new App()) + .UseX11() + .UseLinuxFrameBuffer() + .UseMacOS() + .UseWin32() + .Build(); + + host.Run(); + } +} diff --git a/demos/UnoTodo/UnoTodo/Platforms/WebAssembly/LinkerConfig.xml b/demos/UnoTodo/UnoTodo/Platforms/WebAssembly/LinkerConfig.xml new file mode 100644 index 0000000..a72b4b5 --- /dev/null +++ b/demos/UnoTodo/UnoTodo/Platforms/WebAssembly/LinkerConfig.xml @@ -0,0 +1,10 @@ + + + + + diff --git a/demos/UnoTodo/UnoTodo/Platforms/WebAssembly/Program.cs b/demos/UnoTodo/UnoTodo/Platforms/WebAssembly/Program.cs new file mode 100644 index 0000000..66b49a8 --- /dev/null +++ b/demos/UnoTodo/UnoTodo/Platforms/WebAssembly/Program.cs @@ -0,0 +1,16 @@ +using Uno.UI.Hosting; + +namespace UnoTodo; + +public class Program +{ + public static async Task Main(string[] args) + { + var host = UnoPlatformHostBuilder.Create() + .App(() => new App()) + .UseWebAssembly() + .Build(); + + await host.RunAsync(); + } +} \ No newline at end of file diff --git a/demos/UnoTodo/UnoTodo/Platforms/WebAssembly/WasmCSS/Fonts.css b/demos/UnoTodo/UnoTodo/Platforms/WebAssembly/WasmCSS/Fonts.css new file mode 100644 index 0000000..4fdd605 --- /dev/null +++ b/demos/UnoTodo/UnoTodo/Platforms/WebAssembly/WasmCSS/Fonts.css @@ -0,0 +1,28 @@ +/** + When adding fonts here, make sure to add them using a base64 data uri, otherwise + fonts loading are delayed, and text may get displayed incorrectly. +*/ + +/* https://github.com/unoplatform/uno/issues/3954 */ +@font-face { + font-family: 'Segoe UI'; + src: local('Segoe UI'), local('-apple-system'), local('BlinkMacSystemFont'), local('Inter'), local('Cantarell'), local('Ubuntu'), local('Roboto'), local('Open Sans'), local('Noto Sans'), local('Helvetica Neue'), local('sans-serif'); +} + +@font-face { + font-family: 'Roboto'; + src: url(./Uno.Fonts.Roboto/Fonts/Roboto-Light.ttf) format('truetype'); + font-weight: 300; +} + +@font-face { + font-family: 'Roboto'; + src: url(./Uno.Fonts.Roboto/Fonts/Roboto-Regular.ttf) format('truetype'); + font-weight: 400; +} + +@font-face { + font-family: 'Roboto'; + src: url(./Uno.Fonts.Roboto/Fonts/Roboto-Medium.ttf) format('truetype'); + font-weight: 500; +} diff --git a/demos/UnoTodo/UnoTodo/Platforms/WebAssembly/WasmScripts/AppManifest.js b/demos/UnoTodo/UnoTodo/Platforms/WebAssembly/WasmScripts/AppManifest.js new file mode 100644 index 0000000..2c20e46 --- /dev/null +++ b/demos/UnoTodo/UnoTodo/Platforms/WebAssembly/WasmScripts/AppManifest.js @@ -0,0 +1,3 @@ +var UnoAppManifest = { + displayName: "UnoTodo" +} diff --git a/demos/UnoTodo/UnoTodo/Platforms/WebAssembly/manifest.webmanifest b/demos/UnoTodo/UnoTodo/Platforms/WebAssembly/manifest.webmanifest new file mode 100644 index 0000000..96179c2 --- /dev/null +++ b/demos/UnoTodo/UnoTodo/Platforms/WebAssembly/manifest.webmanifest @@ -0,0 +1,10 @@ +{ + "background_color": "#ffffff", + "description": "UnoTodo", + "display": "standalone", + "name": "UnoTodo", + "short_name": "UnoTodo", + "start_url": "/index.html", + "theme_color": "#ffffff", + "scope": "/" +} diff --git a/demos/UnoTodo/UnoTodo/Platforms/WebAssembly/wwwroot/staticwebapp.config.json b/demos/UnoTodo/UnoTodo/Platforms/WebAssembly/wwwroot/staticwebapp.config.json new file mode 100644 index 0000000..79c1b17 --- /dev/null +++ b/demos/UnoTodo/UnoTodo/Platforms/WebAssembly/wwwroot/staticwebapp.config.json @@ -0,0 +1,30 @@ +{ + "navigationFallback": { + "rewrite": "/index.html", + "exclude": [ + "*.{css,js}", + "*.{png}", + "*.{c,h,wasm,clr,pdb,dat,txt}" + ] + }, + "routes": [ + { + "route": "/package_*", + "headers": { + "cache-control": "public, immutable, max-age=31536000" + } + }, + { + "route": "/*.ttf", + "headers": { + "cache-control": "public, immutable, max-age=31536000" + } + }, + { + "route": "/*", + "headers": { + "cache-control": "must-revalidate, max-age=3600" + } + } + ] +} diff --git a/demos/UnoTodo/UnoTodo/Platforms/WebAssembly/wwwroot/web.config b/demos/UnoTodo/UnoTodo/Platforms/WebAssembly/wwwroot/web.config new file mode 100644 index 0000000..8f5a860 --- /dev/null +++ b/demos/UnoTodo/UnoTodo/Platforms/WebAssembly/wwwroot/web.config @@ -0,0 +1,78 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/demos/UnoTodo/UnoTodo/Platforms/iOS/Entitlements.plist b/demos/UnoTodo/UnoTodo/Platforms/iOS/Entitlements.plist new file mode 100644 index 0000000..24c3103 --- /dev/null +++ b/demos/UnoTodo/UnoTodo/Platforms/iOS/Entitlements.plist @@ -0,0 +1,6 @@ + + + + + + diff --git a/demos/UnoTodo/UnoTodo/Platforms/iOS/Info.plist b/demos/UnoTodo/UnoTodo/Platforms/iOS/Info.plist new file mode 100644 index 0000000..ea3dcb4 --- /dev/null +++ b/demos/UnoTodo/UnoTodo/Platforms/iOS/Info.plist @@ -0,0 +1,43 @@ + + + + + LSRequiresIPhoneOS + + UIDeviceFamily + + 1 + 2 + + UIRequiredDeviceCapabilities + + armv7 + arm64 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UIViewControllerBasedStatusBarAppearance + + XSAppIconAssets + Assets.xcassets/icon.appiconset + UIApplicationSupportsIndirectInputEvents + + + + + diff --git a/demos/UnoTodo/UnoTodo/Platforms/iOS/Main.iOS.cs b/demos/UnoTodo/UnoTodo/Platforms/iOS/Main.iOS.cs new file mode 100644 index 0000000..7a73981 --- /dev/null +++ b/demos/UnoTodo/UnoTodo/Platforms/iOS/Main.iOS.cs @@ -0,0 +1,18 @@ +using UIKit; +using Uno.UI.Hosting; + +namespace UnoTodo.iOS; + +public class EntryPoint +{ + // This is the main entry point of the application. + public static void Main(string[] args) + { + var host = UnoPlatformHostBuilder.Create() + .App(() => new App()) + .UseAppleUIKit() + .Build(); + + host.Run(); + } +} diff --git a/demos/UnoTodo/UnoTodo/Platforms/iOS/Media.xcassets/LaunchImages.launchimage/Contents.json b/demos/UnoTodo/UnoTodo/Platforms/iOS/Media.xcassets/LaunchImages.launchimage/Contents.json new file mode 100644 index 0000000..69555e4 --- /dev/null +++ b/demos/UnoTodo/UnoTodo/Platforms/iOS/Media.xcassets/LaunchImages.launchimage/Contents.json @@ -0,0 +1,58 @@ +{ + "images": [ + { + "orientation": "portrait", + "extent": "full-screen", + "minimum-system-version": "7.0", + "scale": "2x", + "size": "640x960", + "idiom": "iphone" + }, + { + "orientation": "portrait", + "extent": "full-screen", + "minimum-system-version": "7.0", + "subtype": "retina4", + "scale": "2x", + "size": "640x1136", + "idiom": "iphone" + }, + { + "orientation": "portrait", + "extent": "full-screen", + "minimum-system-version": "7.0", + "scale": "1x", + "size": "768x1024", + "idiom": "ipad" + }, + { + "orientation": "landscape", + "extent": "full-screen", + "minimum-system-version": "7.0", + "scale": "1x", + "size": "1024x768", + "idiom": "ipad" + }, + { + "orientation": "portrait", + "extent": "full-screen", + "minimum-system-version": "7.0", + "scale": "2x", + "size": "1536x2048", + "idiom": "ipad" + }, + { + "orientation": "landscape", + "extent": "full-screen", + "minimum-system-version": "7.0", + "scale": "2x", + "size": "2048x1536", + "idiom": "ipad" + } + ], + "properties": {}, + "info": { + "version": 1, + "author": "" + } +} \ No newline at end of file diff --git a/demos/UnoTodo/UnoTodo/Platforms/iOS/PrivacyInfo.xcprivacy b/demos/UnoTodo/UnoTodo/Platforms/iOS/PrivacyInfo.xcprivacy new file mode 100644 index 0000000..902abb0 --- /dev/null +++ b/demos/UnoTodo/UnoTodo/Platforms/iOS/PrivacyInfo.xcprivacy @@ -0,0 +1,41 @@ + + + + + + + + NSPrivacyAccessedAPIType + NSPrivacyAccessedAPICategoryFileTimestamp + NSPrivacyAccessedAPITypeReasons + + C617.1 + + + + NSPrivacyAccessedAPIType + NSPrivacyAccessedAPICategorySystemBootTime + NSPrivacyAccessedAPITypeReasons + + 35F9.1 + + + + NSPrivacyAccessedAPIType + NSPrivacyAccessedAPICategoryDiskSpace + NSPrivacyAccessedAPITypeReasons + + E174.1 + + + + + + NSPrivacyAccessedAPIType + NSPrivacyAccessedAPICategoryUserDefaults + NSPrivacyAccessedAPITypeReasons + + CA92.1 + + + diff --git a/demos/UnoTodo/UnoTodo/Presentation/MainModel.cs b/demos/UnoTodo/UnoTodo/Presentation/MainModel.cs new file mode 100644 index 0000000..0aa71ae --- /dev/null +++ b/demos/UnoTodo/UnoTodo/Presentation/MainModel.cs @@ -0,0 +1,28 @@ +namespace UnoTodo.Presentation; + +public partial record MainModel +{ + private INavigator _navigator; + + public MainModel( + IStringLocalizer localizer, + IOptions appInfo, + INavigator navigator) + { + _navigator = navigator; + Title = "Main"; + Title += $" - {localizer["ApplicationName"]}"; + Title += $" - {appInfo?.Value?.Environment}"; + } + + public string? Title { get; } + + public IState Name => State.Value(this, () => string.Empty); + + public async Task GoToSecond() + { + var name = await Name; + await _navigator.NavigateViewModelAsync(this, data: new Entity(name!)); + } + +} diff --git a/demos/UnoTodo/UnoTodo/Presentation/MainPage.xaml b/demos/UnoTodo/UnoTodo/Presentation/MainPage.xaml new file mode 100644 index 0000000..7f519a5 --- /dev/null +++ b/demos/UnoTodo/UnoTodo/Presentation/MainPage.xaml @@ -0,0 +1,30 @@ + + + + + + + + + + + +