Rework solution structure to allow more types of library projects (#196)

* Rename avalonia & wpf samples

* Rename rest of samples

* fix sample readme

* Fix compat util tests

* rename / move all src projects

* remove package lock files and move libC# again

* Add rust lib and cargo workspace

* Replace locksmith lib with new filelocksmith-rs library

* Deprecated type

* fix setup compile

* Use thiserror for error handling

* Rename some enums and formatting

* Add missing SHA256

* wip c++ library

* cpp wip

* alphabetize readme

* Try to get build working again

* Fix some conditionally compiled bits

* cross config should be in workspace root

* Fix PathHelper for new rust target dir

* Missed one old path to velopack.csproj

* remove obsolete coverage code

* testawareapp.exe no longer exists
This commit is contained in:
Caelan
2024-08-06 22:56:40 +01:00
committed by GitHub
parent 7071d20292
commit 3128d34b14
547 changed files with 11592 additions and 8464 deletions

View File

@@ -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 = 2
[*.{json,slnf}]
indent_size = 2
end_of_line = lf
[*.{props,targets}]
indent_size = 2
[*.xaml]
indent_size = 2
charset = utf-8-bom
[*.xml]
indent_size = 2
end_of_line = lf
[*.plist]
indent_size = 2
indent_style = tab
end_of_line = lf
[*.manifest]
indent_size = 2
[*.appxmanifest]
indent_size = 2
[*.{json,css,webmanifest}]
indent_size = 2
end_of_line = lf
[web.config]
indent_size = 2
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

403
samples/CSharpUno/.gitignore vendored Normal file
View File

@@ -0,0 +1,403 @@
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
##
## Get latest from https://github.com/github/gitignore/blob/main/VisualStudio.gitignore
# 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 Core
project.lock.json
project.fragment.lock.json
artifacts/
# 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
*.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
# 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
# Local History for Visual Studio Code
.history/
# Windows Installer files from build outputs
*.cab
*.msi
*.msix
*.msm
*.msp
# JetBrains Rider
*.sln.iml
# Single Target Config
solution-config.props
# Publish Profiles
!**/Properties/PublishProfiles/*.pubxml

View File

@@ -0,0 +1,5 @@
{
"recommendations": [
"unoplatform.vscode"
],
}

35
samples/CSharpUno/.vscode/launch.json vendored Normal file
View File

@@ -0,0 +1,35 @@
{
// Use IntelliSense to find out which attributes exist for C# debugging
// Use hover for the description of the existing attributes
// For further information visit https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md
"version": "0.2.0",
"configurations": [
{
"name": "Uno Platform Mobile",
"type": "Uno",
"request": "launch",
// any Uno* task will do, this is simply to satisfy vscode requirement when a launch.json is present
"preLaunchTask": "Uno: android | Debug | android-x64"
},
{
// Use IntelliSense to find out which attributes exist for C# debugging
// Use hover for the description of the existing attributes
// For further information visit https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md
"name": "Uno Platform Desktop (Debug)",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build-desktop",
// If you have changed target frameworks, make sure to update the program path.
"program": "${workspaceFolder}/UnoSample/bin/Debug/net8.0-desktop/UnoSample.dll",
"args": [],
"launchSettingsProfile": "UnoSample (Desktop)",
"env": {
"DOTNET_MODIFIABLE_ASSEMBLIES": "debug"
},
"cwd": "${workspaceFolder}/UnoSample",
// For more information about the 'console' field, see https://aka.ms/VSCode-CS-LaunchJson-Console
"console": "internalConsole",
"stopAtEntry": false
},
]
}

View File

@@ -0,0 +1,7 @@
{
"explorer.fileNesting.enabled": true,
"explorer.fileNesting.expand": false,
"explorer.fileNesting.patterns": {
"*.xaml": "$(capture).xaml.cs"
}
}

31
samples/CSharpUno/.vscode/tasks.json vendored Normal file
View File

@@ -0,0 +1,31 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "build-desktop",
"command": "dotnet",
"type": "process",
"args": [
"build",
"${workspaceFolder}/UnoSample/UnoSample.csproj",
"/property:GenerateFullPaths=true",
"/property:TargetFramework=net8.0-desktop",
"/consoleloggerparameters:NoSummary"
],
"problemMatcher": "$msCompile"
},
{
"label": "publish-desktop",
"command": "dotnet",
"type": "process",
"args": [
"publish",
"${workspaceFolder}/UnoSample/UnoSample.csproj",
"/property:GenerateFullPaths=true",
"/property:TargetFramework=net8.0-desktop",
"/consoleloggerparameters:NoSummary"
],
"problemMatcher": "$msCompile"
}
]
}

View File

@@ -0,0 +1,23 @@
{
"version": "1.0",
"components": [
"Microsoft.VisualStudio.Component.CoreEditor",
"Microsoft.VisualStudio.Workload.CoreEditor",
"Microsoft.NetCore.Component.SDK",
"Microsoft.NetCore.Component.DevelopmentTools",
"Microsoft.Net.ComponentGroup.DevelopmentPrerequisites",
"Microsoft.VisualStudio.Component.TextTemplating",
"Microsoft.VisualStudio.Component.Windows10SDK.19041",
"Microsoft.VisualStudio.ComponentGroup.MSIX.Packaging",
"Microsoft.VisualStudio.Component.ManagedDesktop.Prerequisites",
"Microsoft.VisualStudio.Component.Debugger.JustInTime",
"Microsoft.VisualStudio.Workload.ManagedDesktop",
"Microsoft.Component.NetFX.Native",
"Microsoft.VisualStudio.Component.Graphics",
"Microsoft.VisualStudio.Component.Merq",
"Microsoft.VisualStudio.Component.MonoDebugger",
"Microsoft.VisualStudio.ComponentGroup.Maui.All",
"Microsoft.VisualStudio.Workload.NetCrossPlat",
"Microsoft.VisualStudio.Workload.NetCoreTools"
]
}

View File

@@ -0,0 +1,23 @@
<Project>
<PropertyGroup>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
<!--
Adding NoWarn to remove build warnings
NU1507: Warning when there are multiple package sources when using CPM with no source mapping
NETSDK1201: Warning that specifying RID won't create self containing app
PRI257: Ignore default language (en) not being one of the included resources (eg en-us, en-uk)
-->
<NoWarn>$(NoWarn);NU1507;NETSDK1201;PRI257</NoWarn>
</PropertyGroup>
<!-- See https://aka.platform.uno/using-uno-sdk#implicit-packages for more information regarding the Implicit Packages version properties. -->
<PropertyGroup>
<UnoExtensionsVersion>4.1.23</UnoExtensionsVersion>
<UnoToolkitVersion>6.0.24</UnoToolkitVersion>
<UnoThemesVersion>5.0.13</UnoThemesVersion>
<UnoCSharpMarkupVersion>5.2.14</UnoCSharpMarkupVersion>
</PropertyGroup>
</Project>

View File

@@ -0,0 +1,2 @@
<Project>
</Project>

View File

@@ -0,0 +1,13 @@
<Project ToolsVersion="15.0">
<!--
To update the version of Uno, you should instead update the Sdk version in the global.json file.
See https://aka.platform.uno/using-uno-sdk for more information.
-->
<ItemGroup>
</ItemGroup>
<ItemGroup>
<PackageVersion Include="Velopack" Version="0.0.528-g2980846" />
<PackageVersion Include="Velopack.Build" Version="0.0.528-g2980846" />
</ItemGroup>
</Project>

View File

@@ -0,0 +1,39 @@
# Uno with Velopack
This solution contains an Uno Desktop application that targets both Windows and macOS. Because Velopack does not currently support mobile or web platforms, those are not included.
## Prerequisites
This solution will publish the application out to the Velopack Flow service. To test the full publish you will need to create a [Velopack Flow account](https://app.velopack.io).
The solution assumes that you have downloaded and installed the Velopack CLI (`vpk`) global tool. This tool can be installed by running `dotnet tool install -g vpk`.
You will need to authenticate with the Velopack Flow service by running `vpk login` and signing in with your Velopack Flow account.
## The Application
`Presentation/MainPage.xaml` contains the main UI for viewing the current version, checking for updates, and applying the latest update.
The `MainViewModel.cs` contains the logic for checking for updates and applying them. The key piece of the setup is the initialization of the `UpdateManager` with the `VelopackFlowUpdateSource` which provides the interaction with the Velopack Flow service.
The `App.xaml.cs` has been updated to contain the [Velopack application startup hook](https://docs.velopack.io/integrating/overview).
### Updating the Project file
There are two properties to set in the `csproj` file to enable the Velopack Flow integration. These are:
```xml
<VelopackPushOnPublish>true</VelopackPushOnPublish>
<VelopackPackId>Velopack.UnoSample</VelopackPackId>
```
`VelopackPackId` is the unique identifier for the application. This is used to identify the application in the Velopack Flow service. It must be unique among all applications.You **MUST** change this to be your own application identifier.
`VelopackPushOnPublish` is a boolean value that determines if the application should be pushed to the Velopack Flow service when it is published. This should be set to `true` to enable the integration.
### Building installers
To build the local installers run the following command replacing `<Version>` with the desired version number.
The `-f` option is used to specify the target framework. Because each target platform should result in a different build, you likely will want to specify a different Velopack channel for each target platform. By default, it will default to your target OS. You can specify the channel by adding `-p:VelopackChannel=<Channel>` to the command.
This can be any of the desktop frameworks specified in the `csproj` file.
```bash
dotnet publish -c Release -f net8.0-desktop -p:VelopackChannel=<Channel> -p:Version=<Version>
```
For example:
```bash
dotnet publish -c Release -f net8.0-desktop -p:VelopackChannel=win-desktop -p:Version=1.0.5
```

View File

@@ -0,0 +1,34 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.11.34929.205
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "UnoSample", "UnoSample\UnoSample.csproj", "{F9ACED52-AE70-46F6-8C7C-2EF629084661}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{29980CC9-DC41-4944-966D-F088C84D1C7B}"
ProjectSection(SolutionItems) = preProject
.gitignore = .gitignore
Directory.Build.props = Directory.Build.props
Directory.Build.targets = Directory.Build.targets
Directory.Packages.props = Directory.Packages.props
global.json = global.json
README.md = README.md
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{F9ACED52-AE70-46F6-8C7C-2EF629084661}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F9ACED52-AE70-46F6-8C7C-2EF629084661}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F9ACED52-AE70-46F6-8C7C-2EF629084661}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F9ACED52-AE70-46F6-8C7C-2EF629084661}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {2FA3FC94-E895-443E-AAA8-9A7F956F9E92}
EndGlobalSection
EndGlobal

View File

@@ -0,0 +1,28 @@
<Application
x:Class="UnoSample.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:utum="using:Uno.Toolkit.UI.Material">
<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<!-- Load WinUI resources -->
<XamlControlsResources xmlns="using:Microsoft.UI.Xaml.Controls" />
<utum:MaterialToolkitTheme ColorOverrideSource="ms-appx:///Styles/ColorPaletteOverride.xaml">
<!-- NOTE: You can override the default Roboto font by providing your font assets here. -->
<!-- <utum:MaterialToolkitTheme.FontOverrideDictionary>
<ResourceDictionary>
<FontFamily x:Key="MaterialLightFontFamily">ms-appx:///Uno.Fonts.Roboto/Fonts/Roboto-Light.ttf#Roboto</FontFamily>
<FontFamily x:Key="MaterialMediumFontFamily">ms-appx:///Uno.Fonts.Roboto/Fonts/Roboto-Medium.ttf#Roboto</FontFamily>
<FontFamily x:Key="MaterialRegularFontFamily">ms-appx:///Uno.Fonts.Roboto/Fonts/Roboto-Regular.ttf#Roboto</FontFamily>
</ResourceDictionary>
</utum:MaterialToolkitTheme.FontOverrideDictionary>-->
</utum:MaterialToolkitTheme>
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Application.Resources>
<!-- Add resources here -->
</Application>

View File

@@ -0,0 +1,116 @@
using Uno.Resizetizer;
using Velopack;
namespace UnoSample;
public partial class App : Application
{
/// <summary>
/// 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().
/// </summary>
public App()
{
// It's important to Run() the VelopackApp as early as possible in app startup.
VelopackApp.Build()
.WithFirstRun((v) => { /* Your first run code here */ })
.Run();
this.InitializeComponent();
}
protected Window? MainWindow { get; private set; }
protected IHost? Host { get; private set; }
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<App>()
.Section<AppConfig>()
)
// Enable localization (see appsettings.json for supported languages)
.UseLocalization()
// Register Json serializers (ISerializer and ISerializer)
.UseSerialization((context, services) => services
.AddContentSerializer(context)
.AddJsonTypeInfo(WeatherForecastContext.Default.IImmutableListWeatherForecast))
.UseHttp((context, services) => services
// Register HttpClient
#if DEBUG
// DelegatingHandler will be automatically injected into Refit Client
.AddTransient<DelegatingHandler, DebugHttpHandler>()
#endif
.AddSingleton<IWeatherCache, WeatherCache>()
.AddRefitClient<IApiClient>(context))
.ConfigureServices((context, services) =>
{
// TODO: Register your services
//services.AddSingleton<IMyService, MyService>();
})
.UseNavigation(RegisterRoutes)
);
MainWindow = builder.Window;
#if DEBUG
MainWindow.EnableHotReload();
#endif
MainWindow.SetWindowIcon();
Host = await builder.NavigateAsync<Shell>();
}
private static void RegisterRoutes(IViewRegistry views, IRouteRegistry routes)
{
views.Register(
new ViewMap(ViewModel: typeof(ShellViewModel)),
new ViewMap<MainPage, MainViewModel>()
);
routes.Register(
new RouteMap("", View: views.FindByViewModel<ShellViewModel>(),
Nested:
[
new ("Main", View: views.FindByViewModel<MainViewModel>())
]
)
);
}
}

View File

@@ -0,0 +1,42 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
width="456"
height="456"
viewBox="0 0 456 456"
version="1.1"
id="svg453"
sodipodi:docname="icon.svg"
inkscape:version="1.2 (dc2aedaf03, 2022-05-15)"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<defs
id="defs457" />
<sodipodi:namedview
id="namedview455"
pagecolor="#ffffff"
bordercolor="#000000"
borderopacity="0.25"
inkscape:showpageshadow="2"
inkscape:pageopacity="0.0"
inkscape:pagecheckerboard="0"
inkscape:deskcolor="#d1d1d1"
showgrid="false"
inkscape:zoom="1.8574561"
inkscape:cx="228.26919"
inkscape:cy="228.26919"
inkscape:window-width="1920"
inkscape:window-height="1027"
inkscape:window-x="-8"
inkscape:window-y="-8"
inkscape:window-maximized="1"
inkscape:current-layer="svg453" />
<rect
x="0"
y="0"
width="456"
height="456"
fill="#FFFFFF"
id="rect451" />
</svg>

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@@ -0,0 +1,137 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
width="450"
height="450"
viewBox="0 0 50.369617 49.826836"
version="1.1"
id="svg151"
sodipodi:docname="icon_foreground.svg"
inkscape:version="1.2 (dc2aedaf03, 2022-05-15)"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<sodipodi:namedview
id="namedview153"
pagecolor="#ffffff"
bordercolor="#000000"
borderopacity="0.25"
inkscape:showpageshadow="2"
inkscape:pageopacity="0.0"
inkscape:pagecheckerboard="0"
inkscape:deskcolor="#d1d1d1"
showgrid="false"
inkscape:zoom="1.250876"
inkscape:cx="218.64677"
inkscape:cy="175.87674"
inkscape:window-width="1920"
inkscape:window-height="1027"
inkscape:window-x="-8"
inkscape:window-y="-8"
inkscape:window-maximized="1"
inkscape:current-layer="g149" />
<defs
id="defs105">
<path
id="aj28a0fd1a"
d="M 1.738,0.156 3.927,2.323 2.347,3.919 0.101,1.81 Z" />
<path
id="fdje57jgic"
d="M 2.201,0.066 3.855,1.703 1.69,3.894 0.093,2.311 Z" />
<path
id="6bg72xwlze"
d="M 2.398,0.044 3.994,1.624 1.886,3.869 0.232,2.232 Z" />
<path
id="eaqjnja8wg"
d="M 1.736,0.023 3.981,2.132 2.344,3.786 0.156,1.619 Z" />
</defs>
<g
fill="none"
fill-rule="evenodd"
id="g149"
transform="translate(-2.9304427e-4,-1.6465461e-4)">
<g
id="g147">
<g
id="g145">
<path
fill="#7a67f8"
d="M 34.758,38.865 H 34.746 C 31.892,38.86 29.342,36.882 26.152,33.692 l -6.93,-6.873 2.166,-2.188 6.937,6.88 c 3.075,3.074 4.876,4.272 6.427,4.275 h 0.005 c 1.567,0 3.467,-1.262 6.558,-4.353 l 3.541,-3.587 c 1.784,-1.784 2.57,-3.34 2.408,-4.762 -0.13,-1.156 -0.894,-2.397 -2.401,-3.904 L 44.83,19.146 C 43.202,17.414 41.211,15.483 39.131,14.414 38.745,12.437 37.48,10.881 37.3,10.596 c 3.803,0.559 7.197,3.703 9.758,6.424 2.788,2.794 5.803,7.176 -0.018,12.996 l -3.54,3.588 c -3.251,3.25 -5.844,5.261 -8.742,5.261"
id="path107" />
<path
fill="#f85977"
d="m 25.399,28.608 6.492,-6.562 c 3.076,-3.076 4.274,-4.877 4.276,-6.428 0.004,-1.567 -1.257,-3.469 -4.352,-6.563 L 28.228,5.515 C 24.58,1.867 22.369,2.699 19.561,5.507 L 19.528,5.54 c -1.54,1.448 -3.237,3.182 -4.346,5.01 -1.031,0.073 -2.361,0.424 -3.997,1.518 0.906,-3.397 3.737,-6.422 6.216,-8.755 2.794,-2.789 7.177,-5.804 12.997,0.017 l 3.588,3.54 c 3.255,3.256 5.266,5.851 5.26,8.754 -0.005,2.854 -1.982,5.404 -5.172,8.594 l -6.489,6.559 z"
id="path109" />
<path
fill="#159bff"
d="M 12.522,38.707 C 8.939,37.946 5.746,34.972 3.308,32.382 2.035,31.106 0.321,29.13 0.042,26.663 c -0.274,-2.414 0.8,-4.795 3.283,-7.278 l 3.542,-3.588 c 3.25,-3.25 5.843,-5.261 8.74,-5.261 h 0.013 c 2.854,0.005 5.404,1.983 8.593,5.172 l 7.046,6.976 -2.165,2.19 -7.053,-6.983 c -3.076,-3.076 -4.876,-4.273 -6.427,-4.276 h -0.006 c -1.566,0 -3.466,1.261 -6.557,4.352 L 5.51,21.555 c -1.784,1.784 -2.57,3.34 -2.409,4.762 0.131,1.156 0.894,2.396 2.402,3.904 l 0.033,0.034 c 1.55,1.649 3.43,3.479 5.401,4.573 0.168,1.739 1.2,3.297 1.585,3.88"
id="path111" />
<path
fill="#67e5ad"
d="m 26.32,49.827 c -1.925,0 -4.114,-0.886 -6.557,-3.33 l -3.588,-3.54 C 9.167,35.949 9.151,32.546 16.086,25.61 l 6.802,-6.872 2.193,2.162 -6.812,6.882 c -3.076,3.076 -4.273,4.877 -4.276,6.427 -0.003,1.568 1.258,3.47 4.352,6.563 l 3.588,3.541 c 3.646,3.647 5.858,2.816 8.666,0.008 l 0.034,-0.033 c 1.654,-1.555 3.5,-3.46 4.593,-5.437 1.661,-0.14 2.9,-0.841 3.835,-1.438 -0.8,3.537 -3.738,6.69 -6.302,9.102 -1.62,1.618 -3.777,3.312 -6.439,3.312"
id="path113" />
<g
transform="translate(21.154,18.577)"
id="g120">
<mask
id="8jptpqrneb"
fill="#ffffff">
<use
xlink:href="#aj28a0fd1a"
id="use115" />
</mask>
<path
d="M 0.101,1.81 1.738,0.156 3.927,2.323 2.347,3.919 Z"
mask="url(#8jptpqrneb)"
id="path118" />
</g>
<g
transform="translate(27.404,20.981)"
id="g127">
<mask
id="b2iljpfwbd"
fill="#ffffff">
<use
xlink:href="#fdje57jgic"
id="use122" />
</mask>
<path
d="M 2.201,0.066 3.855,1.703 1.69,3.894 0.093,2.311 Z"
mask="url(#b2iljpfwbd)"
id="path125" />
</g>
<g
transform="translate(18.99,24.587)"
id="g134">
<mask
id="gj70tyfpnf"
fill="#ffffff">
<use
xlink:href="#6bg72xwlze"
id="use129" />
</mask>
<path
d="M 1.886,3.869 0.232,2.232 2.398,0.044 3.994,1.624 Z"
mask="url(#gj70tyfpnf)"
id="path132" />
</g>
<g
transform="translate(25.24,26.99)"
id="g141">
<mask
id="z7vhvduckh"
fill="#ffffff">
<use
xlink:href="#eaqjnja8wg"
id="use136" />
</mask>
<path
d="M 3.981,2.132 2.344,3.786 0.156,1.619 1.736,0.023 Z"
mask="url(#z7vhvduckh)"
id="path139" />
</g>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 5.5 KiB

View File

@@ -0,0 +1,3 @@
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M16 7H3.83L9.42 1.41L8 0L0 8L8 16L9.41 14.59L3.83 9H16V7Z" fill="#1C1B1F"/>
</svg>

After

Width:  |  Height:  |  Size: 188 B

View File

@@ -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/MacCatalyst | 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 |

View File

@@ -0,0 +1,137 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
width="450"
height="450"
viewBox="0 0 50.369617 49.826836"
version="1.1"
id="svg151"
sodipodi:docname="icon_foreground.svg"
inkscape:version="1.2 (dc2aedaf03, 2022-05-15)"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<sodipodi:namedview
id="namedview153"
pagecolor="#ffffff"
bordercolor="#000000"
borderopacity="0.25"
inkscape:showpageshadow="2"
inkscape:pageopacity="0.0"
inkscape:pagecheckerboard="0"
inkscape:deskcolor="#d1d1d1"
showgrid="false"
inkscape:zoom="1.250876"
inkscape:cx="218.64677"
inkscape:cy="175.87674"
inkscape:window-width="1920"
inkscape:window-height="1027"
inkscape:window-x="-8"
inkscape:window-y="-8"
inkscape:window-maximized="1"
inkscape:current-layer="g149" />
<defs
id="defs105">
<path
id="aj28a0fd1a"
d="M 1.738,0.156 3.927,2.323 2.347,3.919 0.101,1.81 Z" />
<path
id="fdje57jgic"
d="M 2.201,0.066 3.855,1.703 1.69,3.894 0.093,2.311 Z" />
<path
id="6bg72xwlze"
d="M 2.398,0.044 3.994,1.624 1.886,3.869 0.232,2.232 Z" />
<path
id="eaqjnja8wg"
d="M 1.736,0.023 3.981,2.132 2.344,3.786 0.156,1.619 Z" />
</defs>
<g
fill="none"
fill-rule="evenodd"
id="g149"
transform="translate(-2.9304427e-4,-1.6465461e-4)">
<g
id="g147">
<g
id="g145">
<path
fill="#7a67f8"
d="M 34.758,38.865 H 34.746 C 31.892,38.86 29.342,36.882 26.152,33.692 l -6.93,-6.873 2.166,-2.188 6.937,6.88 c 3.075,3.074 4.876,4.272 6.427,4.275 h 0.005 c 1.567,0 3.467,-1.262 6.558,-4.353 l 3.541,-3.587 c 1.784,-1.784 2.57,-3.34 2.408,-4.762 -0.13,-1.156 -0.894,-2.397 -2.401,-3.904 L 44.83,19.146 C 43.202,17.414 41.211,15.483 39.131,14.414 38.745,12.437 37.48,10.881 37.3,10.596 c 3.803,0.559 7.197,3.703 9.758,6.424 2.788,2.794 5.803,7.176 -0.018,12.996 l -3.54,3.588 c -3.251,3.25 -5.844,5.261 -8.742,5.261"
id="path107" />
<path
fill="#f85977"
d="m 25.399,28.608 6.492,-6.562 c 3.076,-3.076 4.274,-4.877 4.276,-6.428 0.004,-1.567 -1.257,-3.469 -4.352,-6.563 L 28.228,5.515 C 24.58,1.867 22.369,2.699 19.561,5.507 L 19.528,5.54 c -1.54,1.448 -3.237,3.182 -4.346,5.01 -1.031,0.073 -2.361,0.424 -3.997,1.518 0.906,-3.397 3.737,-6.422 6.216,-8.755 2.794,-2.789 7.177,-5.804 12.997,0.017 l 3.588,3.54 c 3.255,3.256 5.266,5.851 5.26,8.754 -0.005,2.854 -1.982,5.404 -5.172,8.594 l -6.489,6.559 z"
id="path109" />
<path
fill="#159bff"
d="M 12.522,38.707 C 8.939,37.946 5.746,34.972 3.308,32.382 2.035,31.106 0.321,29.13 0.042,26.663 c -0.274,-2.414 0.8,-4.795 3.283,-7.278 l 3.542,-3.588 c 3.25,-3.25 5.843,-5.261 8.74,-5.261 h 0.013 c 2.854,0.005 5.404,1.983 8.593,5.172 l 7.046,6.976 -2.165,2.19 -7.053,-6.983 c -3.076,-3.076 -4.876,-4.273 -6.427,-4.276 h -0.006 c -1.566,0 -3.466,1.261 -6.557,4.352 L 5.51,21.555 c -1.784,1.784 -2.57,3.34 -2.409,4.762 0.131,1.156 0.894,2.396 2.402,3.904 l 0.033,0.034 c 1.55,1.649 3.43,3.479 5.401,4.573 0.168,1.739 1.2,3.297 1.585,3.88"
id="path111" />
<path
fill="#67e5ad"
d="m 26.32,49.827 c -1.925,0 -4.114,-0.886 -6.557,-3.33 l -3.588,-3.54 C 9.167,35.949 9.151,32.546 16.086,25.61 l 6.802,-6.872 2.193,2.162 -6.812,6.882 c -3.076,3.076 -4.273,4.877 -4.276,6.427 -0.003,1.568 1.258,3.47 4.352,6.563 l 3.588,3.541 c 3.646,3.647 5.858,2.816 8.666,0.008 l 0.034,-0.033 c 1.654,-1.555 3.5,-3.46 4.593,-5.437 1.661,-0.14 2.9,-0.841 3.835,-1.438 -0.8,3.537 -3.738,6.69 -6.302,9.102 -1.62,1.618 -3.777,3.312 -6.439,3.312"
id="path113" />
<g
transform="translate(21.154,18.577)"
id="g120">
<mask
id="8jptpqrneb"
fill="#ffffff">
<use
xlink:href="#aj28a0fd1a"
id="use115" />
</mask>
<path
d="M 0.101,1.81 1.738,0.156 3.927,2.323 2.347,3.919 Z"
mask="url(#8jptpqrneb)"
id="path118" />
</g>
<g
transform="translate(27.404,20.981)"
id="g127">
<mask
id="b2iljpfwbd"
fill="#ffffff">
<use
xlink:href="#fdje57jgic"
id="use122" />
</mask>
<path
d="M 2.201,0.066 3.855,1.703 1.69,3.894 0.093,2.311 Z"
mask="url(#b2iljpfwbd)"
id="path125" />
</g>
<g
transform="translate(18.99,24.587)"
id="g134">
<mask
id="gj70tyfpnf"
fill="#ffffff">
<use
xlink:href="#6bg72xwlze"
id="use129" />
</mask>
<path
d="M 1.886,3.869 0.232,2.232 2.398,0.044 3.994,1.624 Z"
mask="url(#gj70tyfpnf)"
id="path132" />
</g>
<g
transform="translate(25.24,26.99)"
id="g141">
<mask
id="z7vhvduckh"
fill="#ffffff">
<use
xlink:href="#eaqjnja8wg"
id="use136" />
</mask>
<path
d="M 3.981,2.132 2.344,3.786 0.156,1.619 1.736,0.023 Z"
mask="url(#z7vhvduckh)"
id="path139" />
</g>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 5.5 KiB

View File

@@ -0,0 +1,15 @@
global using System.Collections.Immutable;
global using CommunityToolkit.Mvvm.ComponentModel;
global using CommunityToolkit.Mvvm.Input;
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 UnoSample.DataContracts;
global using UnoSample.DataContracts.Serialization;
global using UnoSample.Models;
global using UnoSample.Presentation;
global using UnoSample.Services.Caching;
global using UnoSample.Services.Endpoints;
global using ApplicationExecutionState = Windows.ApplicationModel.Activation.ApplicationExecutionState;

View File

@@ -0,0 +1,6 @@
namespace UnoSample.Models;
public record AppConfig
{
public string? Environment { get; init; }
}

View File

@@ -0,0 +1,3 @@
namespace UnoSample.Models;
public record Entity(string Name);

View File

@@ -0,0 +1,15 @@
namespace UnoSample.DataContracts;
/// <summary>
/// A Weather Forecast for a specific date
/// </summary>
/// <param name="Date">Gets the Date of the Forecast.</param>
/// <param name="TemperatureC">Gets the Forecast Temperature in Celsius.</param>
/// <param name="Summary">Get a description of how the weather will feel.</param>
public record WeatherForecast(DateOnly Date, double TemperatureC, string? Summary)
{
/// <summary>
/// Gets the Forecast Temperature in Fahrenheit
/// </summary>
public double TemperatureF => 32 + (TemperatureC * 9 / 5);
}

View File

@@ -0,0 +1,43 @@
<?xml version="1.0" encoding="utf-8"?>
<Package
xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10"
xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10"
xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities"
IgnorableNamespaces="uap rescap">
<Identity
Name="UnoSample"
Publisher="O=Velopack"
Version="1.0.0.0" />
<Properties>
<DisplayName>UnoSample</DisplayName>
<PublisherDisplayName>UnoSample</PublisherDisplayName>
</Properties>
<Dependencies>
<TargetDeviceFamily Name="Windows.Universal" MinVersion="10.0.17763.0" MaxVersionTested="10.0.19041.0" />
<TargetDeviceFamily Name="Windows.Desktop" MinVersion="10.0.17763.0" MaxVersionTested="10.0.19041.0" />
</Dependencies>
<Resources>
<Resource Language="x-generate"/>
</Resources>
<Applications>
<Application Id="App"
Executable="$targetnametoken$.exe"
EntryPoint="$targetentrypoint$">
<uap:VisualElements
DisplayName="UnoSample"
Description="UnoSample">
<uap:SplashScreen />
</uap:VisualElements>
</Application>
</Applications>
<Capabilities>
<rescap:Capability Name="runFullTrust" />
</Capabilities>
</Package>

View File

@@ -0,0 +1,23 @@
using Uno.UI.Runtime.Skia;
namespace UnoSample;
public class Program
{
[STAThread]
public static void Main(string[] args)
{
#if (!useDependencyInjection && useLoggingFallback)
App.InitializeLogging();
#endif
var host = SkiaHostBuilder.Create()
.App(() => new App())
.UseX11()
.UseLinuxFrameBuffer()
.UseMacOS()
.UseWindows()
.Build();
host.Run();
}
}

View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
</dict>
</plist>

View File

@@ -0,0 +1,26 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>UIDeviceFamily</key>
<array>
<integer>2</integer>
</array>
<key>LSApplicationCategoryType</key>
<string>public.app-category.utilities</string>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>XSAppIconAssets</key>
<string>Assets.xcassets/icon.appiconset</string>
<!--
Adjust this to your application's encryption usage.
<key>ITSAppUsesNonExemptEncryption</key>
<false/>
-->
</dict>
</plist>

View File

@@ -0,0 +1,13 @@
using UIKit;
namespace UnoSample.MacCatalyst;
public class EntryPoint
{
// This is the main entry point of the application.
public static void Main(string[] args)
{
// if you want to use a different Application Delegate class from "AppDelegate"
// you can specify it here.
UIApplication.Main(args, null, typeof(App));
}
}

View File

@@ -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": ""
}
}

View File

@@ -0,0 +1,23 @@
using Microsoft.UI.Dispatching;
using Velopack;
namespace UnoSample;
//public static class Program
//{
// // https://learn.microsoft.com/en-us/windows/apps/windows-app-sdk/migrate-to-windows-app-sdk/guides/applifecycle?WT.mc_id=DT-MVP-5003472#single-instancing-in-main-or-wwinmain
// [STAThread]
// public static void Main(string[] args)
// {
// WinRT.ComWrappersSupport.InitializeComWrappers();
// Application.Start((p) =>
// {
// var context = new DispatcherQueueSynchronizationContext(
// DispatcherQueue.GetForCurrentThread());
// SynchronizationContext.SetSynchronizationContext(context);
// new App();
// });
// }
//}

View File

@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
https://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<PublishProtocol>FileSystem</PublishProtocol>
<Platform>arm64</Platform>
<RuntimeIdentifier>win-arm64</RuntimeIdentifier>
<PublishDir>bin\$(Configuration)\$(TargetFramework)\$(RuntimeIdentifier)\publish\</PublishDir>
<SelfContained>true</SelfContained>
<PublishSingleFile>False</PublishSingleFile>
<PublishReadyToRun Condition="'$(Configuration)' == 'Debug'">False</PublishReadyToRun>
<PublishReadyToRun Condition="'$(Configuration)' != 'Debug'">True</PublishReadyToRun>
<!-- Note: Trimming disabled by default as there may still be an issues with PublishTrimmed support: https://github.com/microsoft/CsWinRT/issues/373 -->
<!--
<PublishTrimmed Condition="'$(Configuration)' != 'Debug'">True</PublishTrimmed>
<TrimMode>partial</TrimMode>
<SuppressTrimAnalysisWarnings>true</SuppressTrimAnalysisWarnings>
-->
</PropertyGroup>
</Project>

View File

@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
https://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<PublishProtocol>FileSystem</PublishProtocol>
<Platform>x64</Platform>
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
<PublishDir>bin\$(Configuration)\$(TargetFramework)\$(RuntimeIdentifier)\publish\</PublishDir>
<SelfContained>true</SelfContained>
<PublishSingleFile>False</PublishSingleFile>
<PublishReadyToRun Condition="'$(Configuration)' == 'Debug'">False</PublishReadyToRun>
<PublishReadyToRun Condition="'$(Configuration)' != 'Debug'">True</PublishReadyToRun>
<!-- Note: Trimming disabled by default as there may still be an issues with PublishTrimmed support: https://github.com/microsoft/CsWinRT/issues/373 -->
<!--
<PublishTrimmed Condition="'$(Configuration)' != 'Debug'">True</PublishTrimmed>
<TrimMode>partial</TrimMode>
<SuppressTrimAnalysisWarnings>true</SuppressTrimAnalysisWarnings>
-->
</PropertyGroup>
</Project>

View File

@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
https://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<PublishProtocol>FileSystem</PublishProtocol>
<Platform>x86</Platform>
<RuntimeIdentifier>win-x86</RuntimeIdentifier>
<PublishDir>bin\$(Configuration)\$(TargetFramework)\$(RuntimeIdentifier)\publish\</PublishDir>
<SelfContained>true</SelfContained>
<PublishSingleFile>False</PublishSingleFile>
<PublishReadyToRun Condition="'$(Configuration)' == 'Debug'">False</PublishReadyToRun>
<PublishReadyToRun Condition="'$(Configuration)' != 'Debug'">True</PublishReadyToRun>
<!-- Note: Trimming disabled by default as there may still be an issues with PublishTrimmed support: https://github.com/microsoft/CsWinRT/issues/373 -->
<!--
<PublishTrimmed Condition="'$(Configuration)' != 'Debug'">True</PublishTrimmed>
<TrimMode>partial</TrimMode>
<SuppressTrimAnalysisWarnings>true</SuppressTrimAnalysisWarnings>
-->
</PropertyGroup>
</Project>

View File

@@ -0,0 +1,39 @@
<Page
x:Class="UnoSample.Presentation.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:UnoSample.Presentation"
xmlns:uen="using:Uno.Extensions.Navigation.UI"
xmlns:um="using:Uno.Material"
xmlns:utu="using:Uno.Toolkit.UI"
Background="{ThemeResource BackgroundBrush}"
NavigationCacheMode="Required">
<Grid utu:SafeArea.Insets="VisibleBounds">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition />
</Grid.RowDefinitions>
<utu:NavigationBar Content="{Binding Title}" />
<StackPanel
Grid.Row="1"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Spacing="16">
<TextBlock Text="The app is not installed with Velopack" Visibility="{x:Bind NotInstalled}" />
<TextBlock Text="{x:Bind ViewModel.CurrentVersion}" />
<Button
HorizontalAlignment="Center"
Command="{Binding CheckForUpdatesCommand}"
Content="Check For Updates" />
<Button
HorizontalAlignment="Center"
Command="{Binding DownloadUpdatesCommand}"
Content="Download Updates"
Visibility="{x:Bind ViewModel.HasUpdate, Mode=OneWay}" />
<TextBlock Text="{Binding Status}" />
</StackPanel>
</Grid>
</Page>

View File

@@ -0,0 +1,13 @@
namespace UnoSample.Presentation;
public sealed partial class MainPage : Page
{
public MainViewModel ViewModel => (MainViewModel)DataContext;
public bool NotInstalled => ViewModel?.IsInstalled != true;
public MainPage()
{
InitializeComponent();
}
}

View File

@@ -0,0 +1,72 @@
using Velopack;
using Velopack.Sources;
namespace UnoSample.Presentation;
public partial class MainViewModel : ObservableObject
{
private readonly UpdateManager _updateManager;
public bool IsInstalled => _updateManager.IsInstalled;
[ObservableProperty]
[NotifyPropertyChangedFor(nameof(HasUpdate))]
private UpdateInfo? _latestUpdate;
public bool HasUpdate => LatestUpdate != null;
public string CurrentVersion => _updateManager.CurrentVersion?.ToFullString() ?? "";
[ObservableProperty]
private string? _status;
public MainViewModel(
IStringLocalizer localizer,
IOptions<AppConfig> appInfo)
{
Title = "Main";
Title += $" - {localizer["ApplicationName"]}";
Title += $" - {appInfo?.Value?.Environment}";
_updateManager = new UpdateManager(new VelopackFlowUpdateSource());
}
public string? Title { get; }
[RelayCommand(CanExecute = nameof(IsInstalled))]
private async Task CheckForUpdates()
{
if (_updateManager.IsInstalled)
{
try
{
Status = "Checking for updates...";
LatestUpdate = await _updateManager.CheckForUpdatesAsync();
Status = LatestUpdate is null ? "No updates available" : $"{LatestUpdate.TargetFullRelease.Version} - Update available";
}
catch (Exception ex)
{
Status = ex.Message;
}
}
}
[RelayCommand(CanExecute = nameof(IsInstalled))]
private async Task DownloadUpdates()
{
if (_updateManager.IsInstalled && LatestUpdate is { } latestUpdate)
{
try
{
Status = $"Downloading {0:p}";
await _updateManager.DownloadUpdatesAsync(latestUpdate, progress => Status = $"Downloading {progress / 100.0:p}");
Status = "Restarting...";
_updateManager.ApplyUpdatesAndRestart(latestUpdate.TargetFullRelease);
}
catch(Exception ex)
{
Status = ex.Message;
}
}
}
}

View File

@@ -0,0 +1,36 @@
<UserControl x:Class="UnoSample.Presentation.Shell"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:UnoSample.Presentation"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:utu="using:Uno.Toolkit.UI"
mc:Ignorable="d"
d:DesignHeight="300"
d:DesignWidth="400">
<Border Background="{ThemeResource BackgroundBrush}">
<utu:ExtendedSplashScreen x:Name="Splash"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
HorizontalContentAlignment="Stretch"
VerticalContentAlignment="Stretch">
<utu:ExtendedSplashScreen.LoadingContentTemplate>
<DataTemplate>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="2*" />
<RowDefinition />
</Grid.RowDefinitions>
<ProgressRing IsActive="True"
Grid.Row="1"
VerticalAlignment="Center"
HorizontalAlignment="Center"
Height="100"
Width="100" />
</Grid>
</DataTemplate>
</utu:ExtendedSplashScreen.LoadingContentTemplate>
</utu:ExtendedSplashScreen>
</Border>
</UserControl>

View File

@@ -0,0 +1,10 @@
namespace UnoSample.Presentation;
public sealed partial class Shell : UserControl, IContentControlProvider
{
public Shell()
{
this.InitializeComponent();
}
public ContentControl ContentControl => Splash;
}

View File

@@ -0,0 +1,18 @@
namespace UnoSample.Presentation;
public class ShellViewModel
{
private readonly INavigator _navigator;
public ShellViewModel(
INavigator navigator)
{
_navigator = navigator;
_ = Start();
}
public async Task Start()
{
await _navigator.NavigateViewModelAsync<MainViewModel>(this);
}
}

View File

@@ -0,0 +1,7 @@
# Getting Started
Welcome to the Uno Platform!
To discover how to get started with your new app: https://aka.platform.uno/get-started
For more information on how to use the Uno.Sdk or upgrade Uno Platform packages in your solution: https://aka.platform.uno/using-uno-sdk

View File

@@ -0,0 +1,23 @@
using System.Collections.Immutable;
using System.Text.Json.Serialization;
namespace UnoSample.DataContracts.Serialization;
/// <summary>
/// Generated class for System.Text.Json Serialization
/// </summary>
/// <remarks>
/// When using the JsonSerializerContext you must add the JsonSerializableAttribute
/// for each type that you may need to serialize / deserialize including both the
/// concrete type and any interface that the concrete type implements.
/// For more information on the JsonSerializerContext see:
/// https://learn.microsoft.com/en-us/dotnet/standard/serialization/system-text-json/source-generation?WT.mc_id=DT-MVP-5002924
/// </remarks>
[JsonSerializable(typeof(WeatherForecast))]
[JsonSerializable(typeof(WeatherForecast[]))]
[JsonSerializable(typeof(IEnumerable<WeatherForecast>))]
[JsonSerializable(typeof(IImmutableList<WeatherForecast>))]
[JsonSerializable(typeof(ImmutableList<WeatherForecast>))]
[JsonSourceGenerationOptions(PropertyNamingPolicy = JsonKnownNamingPolicy.CamelCase)]
public partial class WeatherForecastContext : JsonSerializerContext
{
}

View File

@@ -0,0 +1,6 @@
namespace UnoSample.Services.Caching;
public interface IWeatherCache
{
ValueTask<IImmutableList<WeatherForecast>> GetForecast(CancellationToken token);
}

View File

@@ -0,0 +1,76 @@
using System.Net;
namespace UnoSample.Services.Caching;
public sealed class WeatherCache : IWeatherCache
{
private readonly IApiClient _api;
private readonly ISerializer _serializer;
private readonly ILogger _logger;
public WeatherCache(IApiClient api, ISerializer serializer, ILogger<WeatherCache> logger)
{
_api = api;
_serializer = serializer;
_logger = logger;
}
private bool IsConnected => NetworkInformation.GetInternetConnectionProfile().GetNetworkConnectivityLevel() == NetworkConnectivityLevel.InternetAccess;
public async ValueTask<IImmutableList<WeatherForecast>> GetForecast(CancellationToken token)
{
var weatherText = await GetCachedWeather(token);
if (!string.IsNullOrWhiteSpace(weatherText))
{
return _serializer.FromString<ImmutableArray<WeatherForecast>>(weatherText);
}
if (!IsConnected)
{
_logger.LogWarning("App is offline and cannot connect to the API.");
throw new WebException("No internet connection", WebExceptionStatus.ConnectFailure);
}
var response = await _api.GetWeather(token);
if (response.IsSuccessStatusCode && response.Content is not null)
{
var weather = response.Content;
await Save(weather, token);
return weather;
}
else if (response.Error is not null)
{
_logger.LogError(response.Error, "An error occurred while retrieving the latest Forecast.");
throw response.Error;
}
else
{
return ImmutableArray<WeatherForecast>.Empty;
}
}
private static async ValueTask<StorageFile> GetFile(CreationCollisionOption option) =>
await ApplicationData.Current.TemporaryFolder.CreateFileAsync("weather.json", option);
private async ValueTask<string?> GetCachedWeather(CancellationToken token)
{
var file = await GetFile(CreationCollisionOption.OpenIfExists);
var properties = await file.GetBasicPropertiesAsync();
// Reuse latest cache file if offline
// or if the file is less than 5 minutes old
if (IsConnected || DateTimeOffset.Now.AddMinutes(-5) > properties.DateModified || token.IsCancellationRequested)
{
return null;
}
return await File.ReadAllTextAsync(file.Path, token);
}
private async ValueTask Save(IImmutableList<WeatherForecast> weather, CancellationToken token)
{
var weatherText = _serializer.ToString(weather);
var file = await GetFile(CreationCollisionOption.ReplaceExisting);
await File.WriteAllTextAsync(file.Path, weatherText, token);
}
}

View File

@@ -0,0 +1,44 @@
namespace UnoSample.Services.Endpoints;
internal class DebugHttpHandler : DelegatingHandler
{
private readonly ILogger _logger;
public DebugHttpHandler(ILogger<DebugHttpHandler> logger, HttpMessageHandler? innerHandler = null)
: base(innerHandler ?? new HttpClientHandler())
{
_logger = logger;
}
protected async override Task<HttpResponseMessage> SendAsync(
HttpRequestMessage request,
CancellationToken cancellationToken)
{
var response = await base.SendAsync(request, cancellationToken);
#if DEBUG
if (!response.IsSuccessStatusCode)
{
_logger.LogDebugMessage("Unsuccessful API Call");
if (request.RequestUri is not null)
{
_logger.LogDebugMessage($"{request.RequestUri} ({request.Method})");
}
foreach ((var key, var values) in request.Headers.ToDictionary(x => x.Key, x => string.Join(", ", x.Value)))
{
_logger.LogDebugMessage($"{key}: {values}");
}
var content = request.Content is not null ? await request.Content.ReadAsStringAsync() : null;
if (!string.IsNullOrEmpty(content))
{
_logger.LogDebugMessage(content);
}
// Uncomment to automatically break when an API call fails while debugging
// System.Diagnostics.Debugger.Break();
}
#endif
return response;
}
}

View File

@@ -0,0 +1,9 @@
using Refit;
namespace UnoSample.Services.Endpoints;
[Headers("Content-Type: application/json")]
public interface IApiClient
{
[Get("/api/weatherforecast")]
Task<ApiResponse<IImmutableList<WeatherForecast>>> GetWeather(CancellationToken cancellationToken = default);
}

View File

@@ -0,0 +1,123 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="ApplicationName" xml:space="preserve">
<value>UnoSample-en</value>
</data>
</root>

View File

@@ -0,0 +1,123 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="ApplicationName" xml:space="preserve">
<value>UnoSample-es</value>
</data>
</root>

View File

@@ -0,0 +1,123 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="ApplicationName" xml:space="preserve">
<value>UnoSample-fr</value>
</data>
</root>

View File

@@ -0,0 +1,123 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="ApplicationName" xml:space="preserve">
<value>UnoSample-pt-BR</value>
</data>
</root>

View File

@@ -0,0 +1,76 @@
{
"description": "Default Uno Material colors",
"seed": "#5946d2",
"coreColors": {
"primary": "#5946d2",
"secondary": "#6b4ea2"
},
"extendedColors": [],
"schemes": {
"light": {
"primary": "#5946d2",
"surfaceTint": "#5946d2",
"onPrimary": "#ffffff",
"primaryContainer": "#e5deff",
"onPrimaryContainer": "#170065",
"secondary": "#6b4ea2",
"onSecondary": "#ffffff",
"secondaryContainer": "#ebddff",
"onSecondaryContainer": "#220555",
"tertiary": "#0061a4",
"onTertiary": "#ffffff",
"tertiaryContainer": "#cfe4ff",
"onTertiaryContainer": "#001d36",
"error": "#b3261e",
"onError": "#ffffff",
"errorContainer": "#f9dedc",
"onErrorContainer": "#410e0b",
"background": "#fcfbff",
"onBackground": "#1c1b1f",
"surface": "#ffffff",
"onSurface": "#1c1b1f",
"surfaceVariant": "#f2eff5",
"onSurfaceVariant": "#8b8494",
"outline": "#79747e",
"outlineVariant": "#c9c5d0",
"shadow": "#000000",
"scrim": "#000000",
"inverseSurface": "#e6e1e5",
"inverseOnSurface": "#1c1b1f",
"inversePrimary": "#2a009f"
},
"dark": {
"primary": "#c7bfff",
"surfaceTint": "#c7bfff",
"onPrimary": "#2a009f",
"primaryContainer": "#4129ba",
"onPrimaryContainer": "#e4dfff",
"secondary": "#cdc2dc",
"onSecondary": "#332d41",
"secondaryContainer": "#433c52",
"onSecondaryContainer": "#eddfff",
"tertiary": "#9fcaff",
"onTertiary": "#003258",
"tertiaryContainer": "#00497d",
"onTertiaryContainer": "#d1e4ff",
"error": "#ffb4ab",
"onError": "#690005",
"errorContainer": "#93000a",
"onErrorContainer": "#ffdad6",
"background": "#1c1b1f",
"onBackground": "#e5e1e6",
"surface": "#302d37",
"onSurface": "#e6e1e5",
"surfaceVariant": "#47464f",
"onSurfaceVariant": "#c9c5d0",
"outline": "#928f99",
"outlineVariant": "#57545d",
"shadow": "#000000",
"scrim": "#000000",
"inverseSurface": "#e6e1e5",
"inverseOnSurface": "#1c1b1f",
"inversePrimary": "#2a009f"
}
},
"palettes": {}
}

View File

@@ -0,0 +1,65 @@
<!-- This file is generated by a tool from the file ColorPaletteOverride.json - - YOU SHOULD NOT EDIT IT manually.-->
<ResourceDictionary xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<ResourceDictionary.ThemeDictionaries>
<ResourceDictionary x:Key="Light">
<Color x:Key="PrimaryColor">#5946D2</Color>
<Color x:Key="SurfaceTintColor">#5946D2</Color>
<Color x:Key="OnPrimaryColor">#FFFFFF</Color>
<Color x:Key="PrimaryContainerColor">#E5DEFF</Color>
<Color x:Key="OnPrimaryContainerColor">#170065</Color>
<Color x:Key="SecondaryColor">#6B4EA2</Color>
<Color x:Key="OnSecondaryColor">#FFFFFF</Color>
<Color x:Key="SecondaryContainerColor">#EBDDFF</Color>
<Color x:Key="OnSecondaryContainerColor">#220555</Color>
<Color x:Key="TertiaryColor">#0061A4</Color>
<Color x:Key="OnTertiaryColor">#FFFFFF</Color>
<Color x:Key="TertiaryContainerColor">#CFE4FF</Color>
<Color x:Key="OnTertiaryContainerColor">#001D36</Color>
<Color x:Key="ErrorColor">#B3261E</Color>
<Color x:Key="OnErrorColor">#FFFFFF</Color>
<Color x:Key="ErrorContainerColor">#F9DEDC</Color>
<Color x:Key="OnErrorContainerColor">#410E0B</Color>
<Color x:Key="BackgroundColor">#FCFBFF</Color>
<Color x:Key="OnBackgroundColor">#1C1B1F</Color>
<Color x:Key="SurfaceColor">#FFFFFF</Color>
<Color x:Key="OnSurfaceColor">#1C1B1F</Color>
<Color x:Key="SurfaceVariantColor">#F2EFF5</Color>
<Color x:Key="OnSurfaceVariantColor">#8B8494</Color>
<Color x:Key="OutlineColor">#79747E</Color>
<Color x:Key="OutlineVariantColor">#C9C5D0</Color>
<Color x:Key="SurfaceInverseColor">#E6E1E5</Color>
<Color x:Key="OnsurfaceInverseColor">#1C1B1F</Color>
<Color x:Key="PrimaryInverseColor">#2A009F</Color>
</ResourceDictionary>
<ResourceDictionary x:Key="Dark">
<Color x:Key="PrimaryColor">#C7BFFF</Color>
<Color x:Key="SurfaceTintColor">#C7BFFF</Color>
<Color x:Key="OnPrimaryColor">#2A009F</Color>
<Color x:Key="PrimaryContainerColor">#4129BA</Color>
<Color x:Key="OnPrimaryContainerColor">#E4DFFF</Color>
<Color x:Key="SecondaryColor">#CDC2DC</Color>
<Color x:Key="OnSecondaryColor">#332D41</Color>
<Color x:Key="SecondaryContainerColor">#433C52</Color>
<Color x:Key="OnSecondaryContainerColor">#EDDFFF</Color>
<Color x:Key="TertiaryColor">#9FCAFF</Color>
<Color x:Key="OnTertiaryColor">#003258</Color>
<Color x:Key="TertiaryContainerColor">#00497D</Color>
<Color x:Key="OnTertiaryContainerColor">#D1E4FF</Color>
<Color x:Key="ErrorColor">#FFB4AB</Color>
<Color x:Key="OnErrorColor">#690005</Color>
<Color x:Key="ErrorContainerColor">#93000A</Color>
<Color x:Key="OnErrorContainerColor">#FFDAD6</Color>
<Color x:Key="BackgroundColor">#1C1B1F</Color>
<Color x:Key="OnBackgroundColor">#E5E1E6</Color>
<Color x:Key="SurfaceColor">#302D37</Color>
<Color x:Key="OnSurfaceColor">#E6E1E5</Color>
<Color x:Key="SurfaceVariantColor">#47464F</Color>
<Color x:Key="OnSurfaceVariantColor">#C9C5D0</Color>
<Color x:Key="OutlineColor">#928F99</Color>
<Color x:Key="OutlineVariantColor">#57545D</Color>
<Color x:Key="SurfaceInverseColor">#E6E1E5</Color>
<Color x:Key="OnsurfaceInverseColor">#1C1B1F</Color>
<Color x:Key="PrimaryInverseColor">#2A009F</Color>
</ResourceDictionary>
</ResourceDictionary.ThemeDictionaries>
</ResourceDictionary>

View File

@@ -0,0 +1,75 @@
<Project Sdk="Uno.Sdk">
<PropertyGroup>
<TargetFrameworks>
net8.0-maccatalyst;
net8.0-windows10.0.19041;
net8.0-desktop;
</TargetFrameworks>
<OutputType>Exe</OutputType>
<UnoSingleProject>true</UnoSingleProject>
<VelopackPushOnPublish>true</VelopackPushOnPublish>
<VelopackPackId>Velopack.UnoSample</VelopackPackId>
<!-- Display name -->
<ApplicationTitle>UnoSample</ApplicationTitle>
<!-- App Identifier -->
<ApplicationId>com.velopack.UnoSample</ApplicationId>
<!-- Versions -->
<ApplicationDisplayVersion>1.0</ApplicationDisplayVersion>
<ApplicationVersion>1</ApplicationVersion>
<!--
If you encounter this error message:
error NETSDK1148: A referenced assembly was compiled using a newer version of Microsoft.Windows.SDK.NET.dll.
Please update to a newer .NET SDK in order to reference this assembly.
This means that the two packages below must be aligned with the "build" version number of
the "Microsoft.Windows.SDK.BuildTools" package above, and the "revision" version number
must be the highest found in https://www.nuget.org/packages/Microsoft.Windows.SDK.NET.Ref.
-->
<!-- <WindowsSdkPackageVersion>10.0.22621.28</WindowsSdkPackageVersion> -->
<!--
UnoFeatures let's you quickly add and manage implicit package references based on the features you want to use.
https://aka.platform.uno/singleproject-features
-->
<UnoFeatures>
Material;
Dsp;
Hosting;
Toolkit;
Logging;
Mvvm;
Configuration;
Http;
Serialization;
Localization;
Navigation;
ThemeService;
</UnoFeatures>
</PropertyGroup>
<!--
Disables the auto-generated Main method so that we can add in the Velopack calls at startup.
-->
<!--<PropertyGroup Condition="'$(TargetFramework)'=='net8.0-windows10.0.19041'">
<DefineConstants>$(DefineConstants);DISABLE_XAML_GENERATED_MAIN</DefineConstants>
</PropertyGroup>-->
<ItemGroup>
<PackageReference Include="Velopack" />
<PackageReference Include="Velopack.Build">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>
<ItemGroup>
<Compile Update="Platforms\Windows\Program.cs">
<Sdk>Uno</Sdk>
</Compile>
</ItemGroup>
</Project>

View File

@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="utf-8"?>
<assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1">
<assemblyIdentity version="1.0.0.0" name="UnoSample.Windows.app"/>
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
<application>
<!--The ID below informs the system that this application is compatible with OS features first introduced in Windows 8.
For more info see https://docs.microsoft.com/windows/win32/sysinfo/targeting-your-application-at-windows-8-1
It is also necessary to support features in unpackaged applications, for example the custom titlebar implementation.-->
<supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}" />
</application>
</compatibility>
<application xmlns="urn:schemas-microsoft-com:asm.v3">
<windowsSettings>
<!-- The combination of below two tags have the following effect:
1) Per-Monitor for >= Windows 10 Anniversary Update
2) System < Windows 10 Anniversary Update
-->
<dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true/PM</dpiAware>
<dpiAwareness xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">PerMonitorV2, PerMonitor</dpiAwareness>
</windowsSettings>
</application>
</assembly>

View File

@@ -0,0 +1,9 @@
{
"AppConfig": {
"Environment": "Development"
},
"ApiClient": {
"Url": "https://localhost:5002",
"UseNativeHandler": true
}
}

View File

@@ -0,0 +1,16 @@
{
"AppConfig": {
"Environment": "Production"
},
"ApiClient": {
"UseNativeHandler": true
},
"LocalizationConfiguration": {
"Cultures": [
"es",
"fr",
"pt-BR",
"en"
]
}
}

View File

@@ -0,0 +1,6 @@
{
// To update the version of Uno please update the version of the Uno.Sdk here. See https://aka.platform.uno/upgrade-uno-packages for more information.
"msbuild-sdks": {
"Uno.Sdk": "5.2.161"
}
}