diff --git a/UI/ChatUI/src/.editorconfig b/UI/ChatUI/src/.editorconfig
index b947be645..bf543a185 100644
--- a/UI/ChatUI/src/.editorconfig
+++ b/UI/ChatUI/src/.editorconfig
@@ -9,11 +9,30 @@ root = true
##########################################
[*]
-indent_style = space
+indent_style = tab
end_of_line = crlf
trim_trailing_whitespace = true
insert_final_newline = true
charset = utf-8
+dotnet_style_operator_placement_when_wrapping = beginning_of_line
+tab_width = 4
+indent_size = 4
+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
+dotnet_style_prefer_inferred_anonymous_type_member_names = true:suggestion
+dotnet_style_prefer_compound_assignment = true:suggestion
+dotnet_style_prefer_simplified_interpolation = true:suggestion
+dotnet_style_prefer_collection_expression = when_types_loosely_match:suggestion
+dotnet_style_namespace_match_folder = true:suggestion
##########################################
# File Extension Settings
@@ -31,40 +50,40 @@ indent_style = tab
indent_size = 2
[*.{csproj,proj,projitems,shproj}]
-indent_size = 2
+indent_size = 4
[*.{json,slnf}]
indent_size = 2
end_of_line = lf
[*.{props,targets}]
-indent_size = 2
+indent_size = 4
[*.xaml]
-indent_size = 2
+indent_size = 4
charset = utf-8-bom
[*.xml]
-indent_size = 2
+indent_size = 4
end_of_line = lf
[*.plist]
-indent_size = 2
+indent_size = 4
indent_style = tab
end_of_line = lf
[*.manifest]
-indent_size = 2
+indent_size = 4
[*.appxmanifest]
-indent_size = 2
+indent_size = 4
[*.{json,css,webmanifest}]
indent_size = 2
end_of_line = lf
[web.config]
-indent_size = 2
+indent_size = 4
end_of_line = lf
[*.sh]
@@ -165,3 +184,17 @@ 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
+csharp_space_around_binary_operators = before_and_after
+csharp_prefer_system_threading_lock = true:suggestion
+csharp_style_throw_expression = true:suggestion
+csharp_style_prefer_null_check_over_type_check = true:suggestion
+csharp_prefer_simple_default_expression = true:suggestion
+csharp_style_prefer_local_over_anonymous_function = true:suggestion
+csharp_style_prefer_index_operator = true:suggestion
+csharp_style_prefer_range_operator = true:suggestion
+csharp_style_implicit_object_creation_when_type_is_apparent = true:suggestion
+csharp_style_prefer_implicitly_typed_lambda_expression = true:suggestion
+csharp_style_prefer_tuple_swap = true:suggestion
+csharp_style_prefer_unbound_generic_type_in_nameof = true:suggestion
+csharp_style_prefer_utf8_string_literals = true:suggestion
+csharp_style_inlined_variable_declaration = true:suggestion
diff --git a/UI/ChatUI/src/.gitignore b/UI/ChatUI/src/.gitignore
index ef88c2053..64f871fce 100644
--- a/UI/ChatUI/src/.gitignore
+++ b/UI/ChatUI/src/.gitignore
@@ -1,7 +1,10 @@
## 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
+## Get latest from `dotnet new gitignore`
+
+# dotenv files
+.env
# User-specific files
*.rsuser
@@ -57,11 +60,14 @@ dlldata.c
# Benchmark Results
BenchmarkDotNet.Artifacts/
-# .NET Core
+# .NET
project.lock.json
project.fragment.lock.json
artifacts/
+# Tye
+.tye/
+
# ASP.NET Scaffolding
ScaffoldingReadMe.txt
@@ -82,6 +88,8 @@ StyleCopReport.xml
*.pgc
*.pgd
*.rsp
+# but not Directory.Build.rsp, as it configures directory-level build defaults
+!Directory.Build.rsp
*.sbr
*.tlb
*.tli
@@ -396,6 +404,82 @@ FodyWeavers.xsd
# 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
diff --git a/UI/ChatUI/src/.run/ChatUI.run.xml b/UI/ChatUI/src/.run/ChatUI.run.xml
new file mode 100644
index 000000000..696ed50ce
--- /dev/null
+++ b/UI/ChatUI/src/.run/ChatUI.run.xml
@@ -0,0 +1,47 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/UI/ChatUI/src/.run/Readme.md b/UI/ChatUI/src/.run/Readme.md
new file mode 100644
index 000000000..6e72638a0
--- /dev/null
+++ b/UI/ChatUI/src/.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/UI/ChatUI/src/.vscode/extensions.json b/UI/ChatUI/src/.vscode/extensions.json
new file mode 100644
index 000000000..a63ad4009
--- /dev/null
+++ b/UI/ChatUI/src/.vscode/extensions.json
@@ -0,0 +1,5 @@
+{
+ "recommendations": [
+ "unoplatform.vscode"
+ ],
+}
diff --git a/UI/ChatUI/src/.vscode/launch.json b/UI/ChatUI/src/.vscode/launch.json
new file mode 100644
index 000000000..3f80b9031
--- /dev/null
+++ b/UI/ChatUI/src/.vscode/launch.json
@@ -0,0 +1,77 @@
+{
+ // 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 Debug",
+ "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 WebAssembly Debug (Chrome)",
+ "type": "chrome",
+ "request": "launch",
+ "url": "http://localhost:5000",
+ "webRoot": "${workspaceFolder}/ChatUI",
+ "inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}",
+ "timeout": 30000,
+ "preLaunchTask": "build-wasm",
+ "server": {
+ "runtimeExecutable": "dotnet",
+ "program": "run",
+ "args": ["--no-build","-f","net9.0-browserwasm","--launch-profile", "ChatUI (WebAssembly)"],
+ "outputCapture": "std",
+ "timeout": 30000,
+ "cwd": "${workspaceFolder}/ChatUI"
+ }
+ },
+ {
+ // 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 WebAssembly Debug (Edge)",
+ "type": "msedge",
+ "request": "launch",
+ "url": "http://localhost:5000",
+ "webRoot": "${workspaceFolder}/ChatUI",
+ "inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}",
+ "timeout": 30000,
+ "preLaunchTask": "build-wasm",
+ "server": {
+ "runtimeExecutable": "dotnet",
+ "program": "run",
+ "args": ["--no-build","-f","net9.0-browserwasm","--launch-profile", "ChatUI (WebAssembly)"],
+ "outputCapture": "std",
+ "timeout": 30000,
+ "cwd": "${workspaceFolder}/ChatUI"
+ }
+ },
+ {
+ // 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}/ChatUI/bin/Debug/net9.0-desktop/ChatUI.dll",
+ "args": [],
+ "launchSettingsProfile": "ChatUI (Desktop)",
+ "env": {
+ "DOTNET_MODIFIABLE_ASSEMBLIES": "debug"
+ },
+ "cwd": "${workspaceFolder}/ChatUI",
+ // For more information about the 'console' field, see https://aka.ms/VSCode-CS-LaunchJson-Console
+ "console": "internalConsole",
+ "stopAtEntry": false
+ },
+ ]
+}
diff --git a/UI/ChatUI/src/.vscode/settings.json b/UI/ChatUI/src/.vscode/settings.json
new file mode 100644
index 000000000..3405922d5
--- /dev/null
+++ b/UI/ChatUI/src/.vscode/settings.json
@@ -0,0 +1,10 @@
+{
+ "explorer.fileNesting.enabled": true,
+ "explorer.fileNesting.expand": false,
+ "explorer.fileNesting.patterns": {
+ "*.xaml": "$(capture).xaml.cs"
+ },
+ "files.associations": {
+ "global.json": "jsonc"
+ }
+}
diff --git a/UI/ChatUI/src/.vscode/tasks.json b/UI/ChatUI/src/.vscode/tasks.json
new file mode 100644
index 000000000..30fb74a39
--- /dev/null
+++ b/UI/ChatUI/src/.vscode/tasks.json
@@ -0,0 +1,57 @@
+{
+ "version": "2.0.0",
+ "tasks": [
+ {
+ "label": "build-wasm",
+ "command": "dotnet",
+ "type": "process",
+ "args": [
+ "build",
+ "${workspaceFolder}/ChatUI/ChatUI.csproj",
+ "/property:GenerateFullPaths=true",
+ "/property:TargetFramework=net9.0-browserwasm",
+ "/consoleloggerparameters:NoSummary"
+ ],
+ "problemMatcher": "$msCompile"
+ },
+ {
+ "label": "publish-wasm",
+ "command": "dotnet",
+ "type": "process",
+ "args": [
+ "publish",
+ "${workspaceFolder}/ChatUI/ChatUI.csproj",
+ "/property:GenerateFullPaths=true",
+ "/property:TargetFramework=net9.0-browserwasm",
+ "/consoleloggerparameters:NoSummary"
+ ],
+ "problemMatcher": "$msCompile"
+ },
+ {
+ "label": "build-desktop",
+ "command": "dotnet",
+ "type": "process",
+ "args": [
+ "build",
+ "${workspaceFolder}/ChatUI/ChatUI.csproj",
+ "/property:GenerateFullPaths=true",
+ "/property:TargetFramework=net9.0-desktop",
+ "/consoleloggerparameters:NoSummary"
+ ],
+ "problemMatcher": "$msCompile"
+ },
+ {
+ "label": "publish-desktop",
+ "command": "dotnet",
+ "type": "process",
+ "args": [
+ "publish",
+ "${workspaceFolder}/ChatUI/ChatUI.csproj",
+ "/property:GenerateFullPaths=true",
+ "/property:TargetFramework=net9.0-desktop",
+ "/consoleloggerparameters:NoSummary"
+ ],
+ "problemMatcher": "$msCompile"
+ }
+ ]
+}
diff --git a/UI/ChatUI/src/.vsconfig b/UI/ChatUI/src/.vsconfig
index 0439670d0..f6ff3911b 100644
--- a/UI/ChatUI/src/.vsconfig
+++ b/UI/ChatUI/src/.vsconfig
@@ -16,7 +16,6 @@
"Microsoft.VisualStudio.ComponentGroup.Web.Client",
"Microsoft.VisualStudio.Workload.NetWeb",
"Microsoft.VisualStudio.ComponentGroup.WebToolsExtensions.TemplateEngine",
- "Microsoft.VisualStudio.ComponentGroup.MSIX.Packaging",
"Microsoft.VisualStudio.Component.ManagedDesktop.Prerequisites",
"Microsoft.VisualStudio.Component.Debugger.JustInTime",
"Microsoft.VisualStudio.Workload.ManagedDesktop",
@@ -27,8 +26,5 @@
"Component.OpenJDK",
"Microsoft.VisualStudio.Workload.NetCrossPlat",
"Microsoft.VisualStudio.Workload.NetCoreTools"
- ],
- "extensions": [
- "https://marketplace.visualstudio.com/items?itemName=unoplatform.uno-platform-addin-2022"
]
}
diff --git a/UI/ChatUI/src/ChatUI.sln b/UI/ChatUI/src/ChatUI.sln
index 63d130ce9..f438fb07f 100644
--- a/UI/ChatUI/src/ChatUI.sln
+++ b/UI/ChatUI/src/ChatUI.sln
@@ -1,16 +1,14 @@
+
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}") = "ChatUI", "ChatUI\ChatUI.csproj", "{DD0412B8-7520-40B6-9606-B42B83F09A2E}"
+VisualStudioVersion = 17.14.36429.23 d17.14
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ChatUI", "ChatUI\ChatUI.csproj", "{C7C2D12E-FCFD-4B4C-BB91-DF3517A77DC9}"
EndProject
-
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{BADA71DC-7FFD-4EDC-9F28-FB74AEADC713}"
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{02EA681E-C7D8-13C7-8484-4AC65E1B71E8}"
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
@@ -20,70 +18,20 @@ 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
- {DD0412B8-7520-40B6-9606-B42B83F09A2E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {DD0412B8-7520-40B6-9606-B42B83F09A2E}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {DD0412B8-7520-40B6-9606-B42B83F09A2E}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
- {DD0412B8-7520-40B6-9606-B42B83F09A2E}.Debug|ARM.ActiveCfg = Debug|Any CPU
- {DD0412B8-7520-40B6-9606-B42B83F09A2E}.Debug|ARM.Build.0 = Debug|Any CPU
- {DD0412B8-7520-40B6-9606-B42B83F09A2E}.Debug|ARM.Deploy.0 = Debug|Any CPU
- {DD0412B8-7520-40B6-9606-B42B83F09A2E}.Debug|ARM64.ActiveCfg = Debug|Any CPU
- {DD0412B8-7520-40B6-9606-B42B83F09A2E}.Debug|ARM64.Build.0 = Debug|Any CPU
- {DD0412B8-7520-40B6-9606-B42B83F09A2E}.Debug|ARM64.Deploy.0 = Debug|Any CPU
- {DD0412B8-7520-40B6-9606-B42B83F09A2E}.Debug|iPhone.ActiveCfg = Debug|Any CPU
- {DD0412B8-7520-40B6-9606-B42B83F09A2E}.Debug|iPhone.Build.0 = Debug|Any CPU
- {DD0412B8-7520-40B6-9606-B42B83F09A2E}.Debug|iPhone.Deploy.0 = Debug|Any CPU
- {DD0412B8-7520-40B6-9606-B42B83F09A2E}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
- {DD0412B8-7520-40B6-9606-B42B83F09A2E}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
- {DD0412B8-7520-40B6-9606-B42B83F09A2E}.Debug|iPhoneSimulator.Deploy.0 = Debug|Any CPU
- {DD0412B8-7520-40B6-9606-B42B83F09A2E}.Debug|x64.ActiveCfg = Debug|Any CPU
- {DD0412B8-7520-40B6-9606-B42B83F09A2E}.Debug|x64.Build.0 = Debug|Any CPU
- {DD0412B8-7520-40B6-9606-B42B83F09A2E}.Debug|x64.Deploy.0 = Debug|Any CPU
- {DD0412B8-7520-40B6-9606-B42B83F09A2E}.Debug|x86.ActiveCfg = Debug|Any CPU
- {DD0412B8-7520-40B6-9606-B42B83F09A2E}.Debug|x86.Build.0 = Debug|Any CPU
- {DD0412B8-7520-40B6-9606-B42B83F09A2E}.Debug|x86.Deploy.0 = Debug|Any CPU
- {DD0412B8-7520-40B6-9606-B42B83F09A2E}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {DD0412B8-7520-40B6-9606-B42B83F09A2E}.Release|Any CPU.Build.0 = Release|Any CPU
- {DD0412B8-7520-40B6-9606-B42B83F09A2E}.Release|Any CPU.Deploy.0 = Release|Any CPU
- {DD0412B8-7520-40B6-9606-B42B83F09A2E}.Release|ARM.ActiveCfg = Release|Any CPU
- {DD0412B8-7520-40B6-9606-B42B83F09A2E}.Release|ARM.Build.0 = Release|Any CPU
- {DD0412B8-7520-40B6-9606-B42B83F09A2E}.Release|ARM.Deploy.0 = Release|Any CPU
- {DD0412B8-7520-40B6-9606-B42B83F09A2E}.Release|ARM64.ActiveCfg = Release|Any CPU
- {DD0412B8-7520-40B6-9606-B42B83F09A2E}.Release|ARM64.Build.0 = Release|Any CPU
- {DD0412B8-7520-40B6-9606-B42B83F09A2E}.Release|ARM64.Deploy.0 = Release|Any CPU
- {DD0412B8-7520-40B6-9606-B42B83F09A2E}.Release|iPhone.ActiveCfg = Release|Any CPU
- {DD0412B8-7520-40B6-9606-B42B83F09A2E}.Release|iPhone.Build.0 = Release|Any CPU
- {DD0412B8-7520-40B6-9606-B42B83F09A2E}.Release|iPhone.Deploy.0 = Release|Any CPU
- {DD0412B8-7520-40B6-9606-B42B83F09A2E}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
- {DD0412B8-7520-40B6-9606-B42B83F09A2E}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
- {DD0412B8-7520-40B6-9606-B42B83F09A2E}.Release|iPhoneSimulator.Deploy.0 = Release|Any CPU
- {DD0412B8-7520-40B6-9606-B42B83F09A2E}.Release|x64.ActiveCfg = Release|Any CPU
- {DD0412B8-7520-40B6-9606-B42B83F09A2E}.Release|x64.Build.0 = Release|Any CPU
- {DD0412B8-7520-40B6-9606-B42B83F09A2E}.Release|x64.Deploy.0 = Release|Any CPU
- {DD0412B8-7520-40B6-9606-B42B83F09A2E}.Release|x86.ActiveCfg = Release|Any CPU
- {DD0412B8-7520-40B6-9606-B42B83F09A2E}.Release|x86.Build.0 = Release|Any CPU
- {DD0412B8-7520-40B6-9606-B42B83F09A2E}.Release|x86.Deploy.0 = Release|Any CPU
+ {C7C2D12E-FCFD-4B4C-BB91-DF3517A77DC9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {C7C2D12E-FCFD-4B4C-BB91-DF3517A77DC9}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {C7C2D12E-FCFD-4B4C-BB91-DF3517A77DC9}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
+ {C7C2D12E-FCFD-4B4C-BB91-DF3517A77DC9}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {C7C2D12E-FCFD-4B4C-BB91-DF3517A77DC9}.Release|Any CPU.Build.0 = Release|Any CPU
+ {C7C2D12E-FCFD-4B4C-BB91-DF3517A77DC9}.Release|Any CPU.Deploy.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
- GlobalSection(NestedProjects) = preSolution
- EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
- SolutionGuid = {DC039F1F-B795-4AEA-94A6-ECE1DB699A51}
+ SolutionGuid = {0426B7AB-C6BF-4015-8B2C-0A24BB7B27DF}
EndGlobalSection
EndGlobal
diff --git a/UI/ChatUI/src/ChatUI/App.xaml b/UI/ChatUI/src/ChatUI/App.xaml
index 24772655c..d9b56d71c 100644
--- a/UI/ChatUI/src/ChatUI/App.xaml
+++ b/UI/ChatUI/src/ChatUI/App.xaml
@@ -1,17 +1,12 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
+ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
+
+
+
+
+
+
+
+
diff --git a/UI/ChatUI/src/ChatUI/App.xaml.cs b/UI/ChatUI/src/ChatUI/App.xaml.cs
index cdd1df73b..d767ca18e 100644
--- a/UI/ChatUI/src/ChatUI/App.xaml.cs
+++ b/UI/ChatUI/src/ChatUI/App.xaml.cs
@@ -1,128 +1,128 @@
-using Uno.Resizetizer;
-
namespace ChatUI;
-
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 override void OnLaunched(LaunchActivatedEventArgs args)
- {
- MainWindow = new Window();
+ ///
+ /// 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 override void OnLaunched(LaunchActivatedEventArgs args)
+ {
+ MainWindow = new Window();
#if DEBUG
- MainWindow.EnableHotReload();
+ MainWindow.UseStudio();
#endif
- // Do not repeat app initialization when the Window already has content,
- // just ensure that the window is active
- if (MainWindow.Content is not Frame rootFrame)
- {
- // Create a Frame to act as the navigation context and navigate to the first page
- rootFrame = new Frame();
-
- // Place the frame in the current Window
- MainWindow.Content = rootFrame;
-
- rootFrame.NavigationFailed += OnNavigationFailed;
- }
-
- if (rootFrame.Content == null)
- {
- // When the navigation stack isn't restored navigate to the first page,
- // configuring the new page by passing required information as a navigation
- // parameter
- rootFrame.Navigate(typeof(MainPage), args.Arguments);
- }
-
- MainWindow.SetWindowIcon();
- // Ensure the current window is active
- MainWindow.Activate();
- }
-
- ///
- /// Invoked when Navigation to a certain page fails
- ///
- /// The Frame which failed navigation
- /// Details about the navigation failure
- void OnNavigationFailed(object sender, NavigationFailedEventArgs e)
- {
- throw new InvalidOperationException($"Failed to load {e.SourcePageType.FullName}: {e.Exception}");
- }
-
- ///
- /// Configures global Uno Platform logging
- ///
- public static void InitializeLogging()
- {
+ // Do not repeat app initialization when the Window already has content,
+ // just ensure that the window is active
+ if (MainWindow.Content is not Frame rootFrame)
+ {
+ // Create a Frame to act as the navigation context and navigate to the first page
+ rootFrame = new Frame();
+
+ // Place the frame in the current Window
+ MainWindow.Content = rootFrame;
+
+ rootFrame.NavigationFailed += OnNavigationFailed;
+ }
+
+ if (rootFrame.Content == null)
+ {
+ // When the navigation stack isn't restored navigate to the first page,
+ // configuring the new page by passing required information as a navigation
+ // parameter
+ rootFrame.Navigate(typeof(MainPage), args.Arguments);
+ }
+
+ MainWindow.SetWindowIcon();
+ // Ensure the current window is active
+ MainWindow.Activate();
+ }
+
+ ///
+ /// Invoked when Navigation to a certain page fails
+ ///
+ /// The Frame which failed navigation
+ /// Details about the navigation failure
+ void OnNavigationFailed(object sender, NavigationFailedEventArgs e)
+ {
+ throw new InvalidOperationException($"Failed to load {e.SourcePageType.FullName}: {e.Exception}");
+ }
+
+ ///
+ /// Configures global Uno Platform logging
+ ///
+ public static void InitializeLogging()
+ {
#if DEBUG
- // Logging is disabled by default for release builds, as it incurs a significant
- // initialization cost from Microsoft.Extensions.Logging setup. If startup performance
- // is a concern for your application, keep this disabled. If you're running on the web or
- // desktop targets, you can use URL or command line parameters to enable it.
- //
- // For more performance documentation: https://platform.uno/docs/articles/Uno-UI-Performance.html
-
- var factory = LoggerFactory.Create(builder =>
- {
+ // Logging is disabled by default for release builds, as it incurs a significant
+ // initialization cost from Microsoft.Extensions.Logging setup. If startup performance
+ // is a concern for your application, keep this disabled. If you're running on the web or
+ // desktop targets, you can use URL or command line parameters to enable it.
+ //
+ // For more performance documentation: https://platform.uno/docs/articles/Uno-UI-Performance.html
+
+ var factory = LoggerFactory.Create(builder =>
+ {
#if __WASM__
- builder.AddProvider(new global::Uno.Extensions.Logging.WebAssembly.WebAssemblyConsoleLoggerProvider());
-#elif __IOS__ || __MACCATALYST__
- builder.AddProvider(new global::Uno.Extensions.Logging.OSLogLoggerProvider());
+ builder.AddProvider(new global::Uno.Extensions.Logging.WebAssembly.WebAssemblyConsoleLoggerProvider());
+#elif __IOS__
+ builder.AddProvider(new global::Uno.Extensions.Logging.OSLogLoggerProvider());
+
+ // Log to the Visual Studio Debug console
+ builder.AddConsole();
#else
- builder.AddConsole();
+ builder.AddConsole();
#endif
- // Exclude logs below this level
- builder.SetMinimumLevel(LogLevel.Information);
+ // Exclude logs below this level
+ builder.SetMinimumLevel(LogLevel.Information);
- // Default filters for Uno Platform namespaces
- builder.AddFilter("Uno", LogLevel.Warning);
- builder.AddFilter("Windows", LogLevel.Warning);
- builder.AddFilter("Microsoft", LogLevel.Warning);
+ // Default filters for Uno Platform namespaces
+ builder.AddFilter("Uno", LogLevel.Warning);
+ builder.AddFilter("Windows", LogLevel.Warning);
+ builder.AddFilter("Microsoft", LogLevel.Warning);
- // Generic Xaml events
- // builder.AddFilter("Microsoft.UI.Xaml", LogLevel.Debug );
- // builder.AddFilter("Microsoft.UI.Xaml.VisualStateGroup", LogLevel.Debug );
- // builder.AddFilter("Microsoft.UI.Xaml.StateTriggerBase", LogLevel.Debug );
- // builder.AddFilter("Microsoft.UI.Xaml.UIElement", LogLevel.Debug );
- // builder.AddFilter("Microsoft.UI.Xaml.FrameworkElement", LogLevel.Trace );
+ // Generic Xaml events
+ // builder.AddFilter("Microsoft.UI.Xaml", LogLevel.Debug );
+ // builder.AddFilter("Microsoft.UI.Xaml.VisualStateGroup", LogLevel.Debug );
+ // builder.AddFilter("Microsoft.UI.Xaml.StateTriggerBase", LogLevel.Debug );
+ // builder.AddFilter("Microsoft.UI.Xaml.UIElement", LogLevel.Debug );
+ // builder.AddFilter("Microsoft.UI.Xaml.FrameworkElement", LogLevel.Trace );
- // Layouter specific messages
- // builder.AddFilter("Microsoft.UI.Xaml.Controls", LogLevel.Debug );
- // builder.AddFilter("Microsoft.UI.Xaml.Controls.Layouter", LogLevel.Debug );
- // builder.AddFilter("Microsoft.UI.Xaml.Controls.Panel", LogLevel.Debug );
+ // Layouter specific messages
+ // builder.AddFilter("Microsoft.UI.Xaml.Controls", LogLevel.Debug );
+ // builder.AddFilter("Microsoft.UI.Xaml.Controls.Layouter", LogLevel.Debug );
+ // builder.AddFilter("Microsoft.UI.Xaml.Controls.Panel", LogLevel.Debug );
- // builder.AddFilter("Windows.Storage", LogLevel.Debug );
+ // builder.AddFilter("Windows.Storage", LogLevel.Debug );
- // Binding related messages
- // builder.AddFilter("Microsoft.UI.Xaml.Data", LogLevel.Debug );
- // builder.AddFilter("Microsoft.UI.Xaml.Data", LogLevel.Debug );
+ // Binding related messages
+ // builder.AddFilter("Microsoft.UI.Xaml.Data", LogLevel.Debug );
+ // builder.AddFilter("Microsoft.UI.Xaml.Data", LogLevel.Debug );
- // Binder memory references tracking
- // builder.AddFilter("Uno.UI.DataBinding.BinderReferenceHolder", LogLevel.Debug );
+ // Binder memory references tracking
+ // builder.AddFilter("Uno.UI.DataBinding.BinderReferenceHolder", LogLevel.Debug );
- // DevServer and HotReload related
- // builder.AddFilter("Uno.UI.RemoteControl", LogLevel.Information);
+ // DevServer and HotReload related
+ // builder.AddFilter("Uno.UI.RemoteControl", LogLevel.Information);
- // Debug JS interop
- // builder.AddFilter("Uno.Foundation.WebAssemblyRuntime", LogLevel.Debug );
- });
+ // Debug JS interop
+ // builder.AddFilter("Uno.Foundation.WebAssemblyRuntime", LogLevel.Debug );
+ });
- global::Uno.Extensions.LogExtensionPoint.AmbientLoggerFactory = factory;
+ global::Uno.Extensions.LogExtensionPoint.AmbientLoggerFactory = factory;
#if HAS_UNO
- global::Uno.UI.Adapter.Microsoft.Extensions.Logging.LoggingAdapter.Initialize();
+ global::Uno.UI.Adapter.Microsoft.Extensions.Logging.LoggingAdapter.Initialize();
#endif
#endif
- }
+ }
}
diff --git a/UI/ChatUI/src/ChatUI/Assets/SharedAssets.md b/UI/ChatUI/src/ChatUI/Assets/SharedAssets.md
index 1b84a74ab..b1cc4e762 100644
--- a/UI/ChatUI/src/ChatUI/Assets/SharedAssets.md
+++ b/UI/ChatUI/src/ChatUI/Assets/SharedAssets.md
@@ -22,7 +22,7 @@ See documentation about assets here: https://github.com/unoplatform/uno/blob/mas
### Table of scales
-| Scale | WinUI | iOS/MacCatalyst | Android |
+| Scale | WinUI | iOS | Android |
|-------|:-----------:|:---------------:|:-------:|
| `100` | scale-100 | @1x | mdpi |
| `125` | scale-125 | N/A | N/A |
diff --git a/UI/ChatUI/src/ChatUI/Behaviors/CommandOnKeyPressBehavior.cs b/UI/ChatUI/src/ChatUI/Behaviors/CommandOnKeyPressBehavior.cs
index 30cdba7d9..606e9169e 100644
--- a/UI/ChatUI/src/ChatUI/Behaviors/CommandOnKeyPressBehavior.cs
+++ b/UI/ChatUI/src/ChatUI/Behaviors/CommandOnKeyPressBehavior.cs
@@ -4,36 +4,36 @@ namespace ChatUI.Behaviors;
public class CommandOnKeyPressBehavior
{
- public static ICommand GetTextBoxCommand(DependencyObject dependencyObject)
- {
- return (ICommand)dependencyObject.GetValue(TextBoxCommandProperty);
- }
+ public static ICommand GetTextBoxCommand(DependencyObject dependencyObject)
+ {
+ return (ICommand)dependencyObject.GetValue(TextBoxCommandProperty);
+ }
- public static void SetTextBoxCommand(DependencyObject dependencyObject, ICommand value)
- {
- dependencyObject.SetValue(TextBoxCommandProperty, value);
- }
+ public static void SetTextBoxCommand(DependencyObject dependencyObject, ICommand value)
+ {
+ dependencyObject.SetValue(TextBoxCommandProperty, value);
+ }
- public static readonly DependencyProperty TextBoxCommandProperty =
- DependencyProperty.RegisterAttached("TextBoxCommand", typeof(ICommand), typeof(CommandOnKeyPressBehavior), new PropertyMetadata(default(ICommand), OnTextBoxCommandChanged));
-
- private static void OnTextBoxCommandChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
- {
- if(d is TextBox textBox)
- {
- textBox.KeyDown -= TextBox_KeyDown;
+ public static readonly DependencyProperty TextBoxCommandProperty =
+ DependencyProperty.RegisterAttached("TextBoxCommand", typeof(ICommand), typeof(CommandOnKeyPressBehavior), new PropertyMetadata(default(ICommand), OnTextBoxCommandChanged));
- textBox.KeyDown += TextBox_KeyDown;
- }
- }
+ private static void OnTextBoxCommandChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
+ {
+ if (d is TextBox textBox)
+ {
+ textBox.KeyDown -= TextBox_KeyDown;
- private static void TextBox_KeyDown(object sender, Microsoft.UI.Xaml.Input.KeyRoutedEventArgs e)
- {
- if (e.Key == VirtualKey.Enter)
- {
- var textBox = sender as TextBox;
- var command = GetTextBoxCommand(textBox);
- command.Execute(null);
- }
- }
+ textBox.KeyDown += TextBox_KeyDown;
+ }
+ }
+
+ private static void TextBox_KeyDown(object sender, Microsoft.UI.Xaml.Input.KeyRoutedEventArgs e)
+ {
+ if (e.Key == VirtualKey.Enter)
+ {
+ var textBox = sender as TextBox;
+ var command = GetTextBoxCommand(textBox);
+ command.Execute(null);
+ }
+ }
}
diff --git a/UI/ChatUI/src/ChatUI/Behaviors/ReversedPointerWheel.cs b/UI/ChatUI/src/ChatUI/Behaviors/ReversedPointerWheel.cs
index e7e60cb50..4327d8a94 100644
--- a/UI/ChatUI/src/ChatUI/Behaviors/ReversedPointerWheel.cs
+++ b/UI/ChatUI/src/ChatUI/Behaviors/ReversedPointerWheel.cs
@@ -5,25 +5,25 @@ namespace ChatUI.Behaviors;
public static class ReversedPointerWheel
{
- public static readonly DependencyProperty IsEnabledProperty = DependencyProperty.RegisterAttached(
- "IsEnabled",
- typeof(bool),
- typeof(ReversedPointerWheel),
- new PropertyMetadata(default(bool), OnIsEnabledChanged));
+ public static readonly DependencyProperty IsEnabledProperty = DependencyProperty.RegisterAttached(
+ "IsEnabled",
+ typeof(bool),
+ typeof(ReversedPointerWheel),
+ new PropertyMetadata(default(bool), OnIsEnabledChanged));
- public static bool GetIsEnabled(FrameworkElement element)
- => (bool)element.GetValue(IsEnabledProperty);
+ public static bool GetIsEnabled(FrameworkElement element)
+ => (bool)element.GetValue(IsEnabledProperty);
- public static void SetIsEnabled(FrameworkElement element, bool value)
- => element.SetValue(IsEnabledProperty, value);
+ public static void SetIsEnabled(FrameworkElement element, bool value)
+ => element.SetValue(IsEnabledProperty, value);
- private static void OnIsEnabledChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
- {
- if (d is ScrollContentPresenter scp)
- {
+ private static void OnIsEnabledChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
+ {
+ if (d is ScrollContentPresenter scp)
+ {
#if HAS_UNO
- // We do have native support for reversed PointerWheel in Uno.
- Uno.UI.Xaml.Controls.ScrollContentPresenter.SetIsPointerWheelReversed(scp, (bool)e.NewValue);
+ // We do have native support for reversed PointerWheel in Uno.
+ Uno.UI.Xaml.Controls.ScrollContentPresenter.SetIsPointerWheelReversed(scp, (bool)e.NewValue);
#else
scp.PointerWheelChanged -= OnWheelChanged;
if (e.NewValue is true)
@@ -31,91 +31,91 @@ private static void OnIsEnabledChanged(DependencyObject d, DependencyPropertyCha
scp.PointerWheelChanged += OnWheelChanged;
}
#endif
- }
- else if (d is FrameworkElement sv)
- {
- sv.Loaded -= PropagateValueToScp;
- if (e.NewValue != DependencyProperty.UnsetValue)
- {
- sv.Loaded += PropagateValueToScp;
- PropagateValueToScp(sv, null);
- }
+ }
+ else if (d is FrameworkElement sv)
+ {
+ sv.Loaded -= PropagateValueToScp;
+ if (e.NewValue != DependencyProperty.UnsetValue)
+ {
+ sv.Loaded += PropagateValueToScp;
+ PropagateValueToScp(sv, null);
+ }
- static void PropagateValueToScp(object sender, RoutedEventArgs? _)
- {
- if (sender is FrameworkElement sv && TryFindFirstChild(sv, 10, out ScrollContentPresenter scp))
- {
- SetIsEnabled(scp, GetIsEnabled(sv));
- }
- }
- }
- }
+ static void PropagateValueToScp(object sender, RoutedEventArgs? _)
+ {
+ if (sender is FrameworkElement sv && TryFindFirstChild(sv, 10, out ScrollContentPresenter scp))
+ {
+ SetIsEnabled(scp, GetIsEnabled(sv));
+ }
+ }
+ }
+ }
- private static void OnWheelChanged(object sender, PointerRoutedEventArgs e)
- {
- if (sender is not ScrollContentPresenter { ScrollOwner: ScrollViewer sv } scp || !GetIsEnabled(scp))
- {
- if (sender is FrameworkElement fe)
- {
- fe.PointerWheelChanged -= OnWheelChanged;
- }
+ private static void OnWheelChanged(object sender, PointerRoutedEventArgs e)
+ {
+ if (sender is not ScrollContentPresenter { ScrollOwner: ScrollViewer sv } scp || !GetIsEnabled(scp))
+ {
+ if (sender is FrameworkElement fe)
+ {
+ fe.PointerWheelChanged -= OnWheelChanged;
+ }
- return;
- }
+ return;
+ }
- var properties = e.GetCurrentPoint(null).Properties;
- if (e.KeyModifiers == VirtualKeyModifiers.Control)
- {
- // Zoom, do nothing.
- }
- else if (!scp.CanVerticallyScroll || properties.IsHorizontalMouseWheel || e.KeyModifiers == VirtualKeyModifiers.Shift)
- {
- if (scp.CanHorizontallyScroll)
- {
- sv.ChangeView(
- horizontalOffset: sv.HorizontalOffset + properties.MouseWheelDelta,
- verticalOffset: null,
- zoomFactor: null,
- disableAnimation: false);
+ var properties = e.GetCurrentPoint(null).Properties;
+ if (e.KeyModifiers == VirtualKeyModifiers.Control)
+ {
+ // Zoom, do nothing.
+ }
+ else if (!scp.CanVerticallyScroll || properties.IsHorizontalMouseWheel || e.KeyModifiers == VirtualKeyModifiers.Shift)
+ {
+ if (scp.CanHorizontallyScroll)
+ {
+ sv.ChangeView(
+ horizontalOffset: sv.HorizontalOffset + properties.MouseWheelDelta,
+ verticalOffset: null,
+ zoomFactor: null,
+ disableAnimation: false);
- e.Handled = true;
- }
- }
- else
- {
- sv.ChangeView(
- horizontalOffset: null,
- verticalOffset: sv.VerticalOffset + properties.MouseWheelDelta,
- zoomFactor: null,
- disableAnimation: false);
+ e.Handled = true;
+ }
+ }
+ else
+ {
+ sv.ChangeView(
+ horizontalOffset: null,
+ verticalOffset: sv.VerticalOffset + properties.MouseWheelDelta,
+ zoomFactor: null,
+ disableAnimation: false);
- e.Handled = true;
- }
- }
+ e.Handled = true;
+ }
+ }
- private static bool TryFindFirstChild(DependencyObject element, uint limit, /*[NotNullWhen(true)]*/ out T result)
- {
- // Finds the first child of type T in the visual tree of element.
- // This is a workaround for the fact that ScrollViewer doesn't expose its ScrollContentPresenter.
+ private static bool TryFindFirstChild(DependencyObject element, uint limit, /*[NotNullWhen(true)]*/ out T result)
+ {
+ // Finds the first child of type T in the visual tree of element.
+ // This is a workaround for the fact that ScrollViewer doesn't expose its ScrollContentPresenter.
- if (element is T t)
- {
- result = t;
- return true;
- }
+ if (element is T t)
+ {
+ result = t;
+ return true;
+ }
- if (limit is not 0)
- {
- for (var i = 0; i < VisualTreeHelper.GetChildrenCount(element); i++)
- {
- if (TryFindFirstChild(VisualTreeHelper.GetChild(element, i), limit - 1, out result))
- {
- return true;
- }
- }
- }
+ if (limit is not 0)
+ {
+ for (var i = 0; i < VisualTreeHelper.GetChildrenCount(element); i++)
+ {
+ if (TryFindFirstChild(VisualTreeHelper.GetChild(element, i), limit - 1, out result))
+ {
+ return true;
+ }
+ }
+ }
- result = default;
- return false;
- }
+ result = default;
+ return false;
+ }
}
diff --git a/UI/ChatUI/src/ChatUI/ChatUI.csproj b/UI/ChatUI/src/ChatUI/ChatUI.csproj
index ba2896879..df19693d6 100644
--- a/UI/ChatUI/src/ChatUI/ChatUI.csproj
+++ b/UI/ChatUI/src/ChatUI/ChatUI.csproj
@@ -1,6 +1,6 @@
-
+
- net8.0-android;net8.0-ios;net8.0-maccatalyst;net8.0-windows10.0.19041;net8.0-browserwasm;net8.0-desktop
+ net9.0-android;net9.0-ios;net9.0-browserwasm;net9.0-desktop
Exe
true
@@ -8,7 +8,7 @@
ChatUI
- com.companyname.chatui
+ com.companyname.ChatUI
1.0
1
@@ -16,27 +16,14 @@
ChatUI
ChatUI powered by Uno Platform.
-
-
-
-
-
- 10.0.19041.38
-
MVUX;
+ SkiaRenderer;
-
diff --git a/UI/ChatUI/src/ChatUI/Commands/RelayCommand.cs b/UI/ChatUI/src/ChatUI/Commands/RelayCommand.cs
index a91cdbcc4..aa9889975 100644
--- a/UI/ChatUI/src/ChatUI/Commands/RelayCommand.cs
+++ b/UI/ChatUI/src/ChatUI/Commands/RelayCommand.cs
@@ -2,22 +2,22 @@ namespace ChatUI.Commands;
public class RelayCommand : ICommand
{
- private Action _execute;
+ private Action _execute;
- public RelayCommand(Action execute)
- {
- _execute = execute;
- }
+ public RelayCommand(Action execute)
+ {
+ _execute = execute;
+ }
- public event EventHandler CanExecuteChanged;
+ public event EventHandler CanExecuteChanged;
- public bool CanExecute(object parameter)
- {
- return true;
- }
+ public bool CanExecute(object parameter)
+ {
+ return true;
+ }
- public void Execute(object parameter)
- {
- _execute((string)parameter);
- }
+ public void Execute(object parameter)
+ {
+ _execute((string)parameter);
+ }
}
diff --git a/UI/ChatUI/src/ChatUI/GlobalUsings.cs b/UI/ChatUI/src/ChatUI/GlobalUsings.cs
index eeafbe36f..7346fa9af 100644
--- a/UI/ChatUI/src/ChatUI/GlobalUsings.cs
+++ b/UI/ChatUI/src/ChatUI/GlobalUsings.cs
@@ -1,4 +1,3 @@
-global using System.Collections.Immutable;
-global using Microsoft.Extensions.DependencyInjection;
+global using System.Collections.Immutable;
global using Microsoft.Extensions.Logging;
-global using ApplicationExecutionState = Windows.ApplicationModel.Activation.ApplicationExecutionState;
+[assembly: Uno.Extensions.Reactive.Config.BindableGenerationTool(3)]
diff --git a/UI/ChatUI/src/ChatUI/MainPage.xaml b/UI/ChatUI/src/ChatUI/MainPage.xaml
index fdb04fc6a..f040ffb16 100644
--- a/UI/ChatUI/src/ChatUI/MainPage.xaml
+++ b/UI/ChatUI/src/ChatUI/MainPage.xaml
@@ -1,258 +1,266 @@
+ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ xmlns:android="http://uno.ui/android"
+ xmlns:behaviors="using:ChatUI.Behaviors"
+ xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+ xmlns:ios="http://uno.ui/ios"
+ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+ xmlns:mvux="using:Uno.Extensions.Reactive.UI"
+ xmlns:presentation="using:ChatUI.Presentation"
+ xmlns:win="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:xamarin="http://uno.ui/xamarin"
+ x:Name="MessageView"
+ Background="{ThemeResource ApplicationPageBackgroundThemeBrush}"
+ mc:Ignorable="d ios android xamarin">
-
-
-
-
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/UI/ChatUI/src/ChatUI/MainPage.xaml.cs b/UI/ChatUI/src/ChatUI/MainPage.xaml.cs
index 68feffeea..0ba7d6493 100644
--- a/UI/ChatUI/src/ChatUI/MainPage.xaml.cs
+++ b/UI/ChatUI/src/ChatUI/MainPage.xaml.cs
@@ -1,14 +1,14 @@
-using ChatUI.Models;
+using ChatUI.Models;
using ChatUI.Services;
namespace ChatUI;
public sealed partial class MainPage : Page
{
- public MainPage()
- {
- this.InitializeComponent();
+ public MainPage()
+ {
+ this.InitializeComponent();
- this.DataContext = new BindableMessageModel(new MessageService());
- }
-}
\ No newline at end of file
+ this.DataContext = new MessageViewModel(new MessageService());
+ }
+}
diff --git a/UI/ChatUI/src/ChatUI/Models/Message.cs b/UI/ChatUI/src/ChatUI/Models/Message.cs
index 5f04cacb5..8c47f49e4 100644
--- a/UI/ChatUI/src/ChatUI/Models/Message.cs
+++ b/UI/ChatUI/src/ChatUI/Models/Message.cs
@@ -1,27 +1,25 @@
-using System;
-
namespace ChatUI.Models;
public class Message
{
- public Message(string text, string contactName = default, DateTimeOffset timestamp = default, bool isMyMessage = true)
- {
- Text = text;
- ContactName = contactName == default ? "Me" : contactName;
- Timestamp = timestamp == default ? DateTimeOffset.Now : timestamp;
- IsMyMessage = isMyMessage;
- }
+ public Message(string text, string contactName = default, DateTimeOffset timestamp = default, bool isMyMessage = true)
+ {
+ Text = text;
+ ContactName = contactName == default ? "Me" : contactName;
+ Timestamp = timestamp == default ? DateTimeOffset.Now : timestamp;
+ IsMyMessage = isMyMessage;
+ }
- public string Text { get; init; }
+ public string Text { get; init; }
- public string ContactName { get; init; }
+ public string ContactName { get; init; }
- public DateTimeOffset Timestamp { get; init; }
+ public DateTimeOffset Timestamp { get; init; }
- public bool IsMyMessage { get; init; }
+ public bool IsMyMessage { get; init; }
- public string UserFriendlyTimestamp => Timestamp.LocalDateTime.ToString("t");
+ public string UserFriendlyTimestamp => Timestamp.LocalDateTime.ToString("t");
- public static Message Empty => new Message(default);
+ public static Message Empty => new Message(default);
}
diff --git a/UI/ChatUI/src/ChatUI/Models/MessageModel.cs b/UI/ChatUI/src/ChatUI/Models/MessageModel.cs
index d87957e83..28be46652 100644
--- a/UI/ChatUI/src/ChatUI/Models/MessageModel.cs
+++ b/UI/ChatUI/src/ChatUI/Models/MessageModel.cs
@@ -4,17 +4,17 @@ namespace ChatUI.Models;
public partial record MessageModel(IMessageService MessageService)
{
- public IListState Messages => ListState
- .Async(this, MessageService.GetMessages);
+ public IListState Messages => ListState
+ .Async(this, MessageService.GetMessages);
- public IState NewMessage => State.Value(this, () => Message.Empty);
+ public IState NewMessage => State.Value(this, () => Message.Empty);
- public async ValueTask AddMessage(Message newMessage, CancellationToken ct)
- {
- await MessageService.AddMessage(newMessage, ct);
+ public async ValueTask AddMessage(Message newMessage, CancellationToken ct)
+ {
+ await MessageService.AddMessage(newMessage, ct);
- await Messages.InsertAsync(newMessage, ct);
+ await Messages.InsertAsync(newMessage, ct);
- await NewMessage.Update(old => Message.Empty, ct);
- }
+ await NewMessage.Update(old => Message.Empty, ct);
+ }
}
\ No newline at end of file
diff --git a/UI/ChatUI/src/ChatUI/Platforms/Android/Assets/AboutAssets.txt b/UI/ChatUI/src/ChatUI/Platforms/Android/Assets/AboutAssets.txt
index 210a93b80..89ab409df 100644
--- a/UI/ChatUI/src/ChatUI/Platforms/Android/Assets/AboutAssets.txt
+++ b/UI/ChatUI/src/ChatUI/Platforms/Android/Assets/AboutAssets.txt
@@ -4,7 +4,7 @@ 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 you package and will be accessible using Android's
+These files will be deployed with your package and will be accessible using Android's
AssetManager, like this:
public class ReadAsset : Activity
diff --git a/UI/ChatUI/src/ChatUI/Platforms/Android/Main.Android.cs b/UI/ChatUI/src/ChatUI/Platforms/Android/Main.Android.cs
index 3c1ee11af..e93be3fa8 100644
--- a/UI/ChatUI/src/ChatUI/Platforms/Android/Main.Android.cs
+++ b/UI/ChatUI/src/ChatUI/Platforms/Android/Main.Android.cs
@@ -1,48 +1,24 @@
-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 Com.Nostra13.Universalimageloader.Core;
-using Microsoft.UI.Xaml.Media;
namespace ChatUI.Droid;
-
[global::Android.App.ApplicationAttribute(
- Label = "@string/ApplicationName",
- Icon = "@mipmap/icon",
- LargeHeap = true,
- HardwareAccelerated = true,
- Theme = "@style/AppTheme"
+ Label = "@string/ApplicationName",
+ Icon = "@mipmap/icon",
+ LargeHeap = true,
+ HardwareAccelerated = true,
+ Theme = "@style/Theme.App.Starting"
)]
public class Application : Microsoft.UI.Xaml.NativeApplication
{
- static Application()
- {
- App.InitializeLogging();
- }
-
- public Application(IntPtr javaReference, JniHandleOwnership transfer)
- : base(() => new App(), javaReference, transfer)
- {
- ConfigureUniversalImageLoader();
- }
-
- private static void ConfigureUniversalImageLoader()
- {
- // Create global configuration and initialize ImageLoader with this config
- ImageLoaderConfiguration config = new ImageLoaderConfiguration
- .Builder(Context)
- .Build();
+ static Application()
+ {
+ App.InitializeLogging();
+ }
- ImageLoader.Instance.Init(config);
+ public Application(IntPtr javaReference, JniHandleOwnership transfer)
+ : base(() => new App(), javaReference, transfer)
+ {
+ }
- ImageSource.DefaultImageLoader = ImageLoader.Instance.LoadImageAsync;
- }
}
diff --git a/UI/ChatUI/src/ChatUI/Platforms/Android/MainActivity.Android.cs b/UI/ChatUI/src/ChatUI/Platforms/Android/MainActivity.Android.cs
index a2e08d521..4ad497b80 100644
--- a/UI/ChatUI/src/ChatUI/Platforms/Android/MainActivity.Android.cs
+++ b/UI/ChatUI/src/ChatUI/Platforms/Android/MainActivity.Android.cs
@@ -1,16 +1,20 @@
using Android.App;
-using Android.Content.PM;
using Android.OS;
using Android.Views;
-using Android.Widget;
namespace ChatUI.Droid;
-
[Activity(
- MainLauncher = true,
- ConfigurationChanges = global::Uno.UI.ActivityHelper.AllConfigChanges,
- WindowSoftInputMode = SoftInput.AdjustNothing | SoftInput.StateHidden
+ 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/UI/ChatUI/src/ChatUI/Platforms/Android/Resources/values/Styles.xml b/UI/ChatUI/src/ChatUI/Platforms/Android/Resources/values/Styles.xml
index c02bd06f7..f47dcf36b 100644
--- a/UI/ChatUI/src/ChatUI/Platforms/Android/Resources/values/Styles.xml
+++ b/UI/ChatUI/src/ChatUI/Platforms/Android/Resources/values/Styles.xml
@@ -1,22 +1,25 @@
+
+
-
diff --git a/UI/ChatUI/src/ChatUI/Platforms/Android/environment.conf b/UI/ChatUI/src/ChatUI/Platforms/Android/environment.conf
index fa6c2e32b..d8c106452 100644
--- a/UI/ChatUI/src/ChatUI/Platforms/Android/environment.conf
+++ b/UI/ChatUI/src/ChatUI/Platforms/Android/environment.conf
@@ -1,2 +1,2 @@
# See this for more details: http://developer.xamarin.com/guides/android/advanced_topics/garbage_collection/
-MONO_GC_PARAMS=bridge-implementation=tarjan,nursery-size=32m,soft-heap-limit=256m
\ No newline at end of file
+MONO_GC_PARAMS=bridge-implementation=new,nursery-size=32m,soft-heap-limit=256m
\ No newline at end of file
diff --git a/UI/ChatUI/src/ChatUI/Platforms/Desktop/Program.cs b/UI/ChatUI/src/ChatUI/Platforms/Desktop/Program.cs
index a0bb2ad35..871e6ed5e 100644
--- a/UI/ChatUI/src/ChatUI/Platforms/Desktop/Program.cs
+++ b/UI/ChatUI/src/ChatUI/Platforms/Desktop/Program.cs
@@ -1,22 +1,21 @@
-using Uno.UI.Runtime.Skia;
+using Uno.UI.Hosting;
namespace ChatUI;
-
-public class Program
+internal class Program
{
- [STAThread]
- public static void Main(string[] args)
- {
- App.InitializeLogging();
+ [STAThread]
+ public static void Main(string[] args)
+ {
+ App.InitializeLogging();
- var host = SkiaHostBuilder.Create()
- .App(() => new App())
- .UseX11()
- .UseLinuxFrameBuffer()
- .UseMacOS()
- .UseWindows()
- .Build();
+ var host = UnoPlatformHostBuilder.Create()
+ .App(() => new App())
+ .UseX11()
+ .UseLinuxFrameBuffer()
+ .UseMacOS()
+ .UseWin32()
+ .Build();
- host.Run();
- }
+ host.Run();
+ }
}
diff --git a/UI/ChatUI/src/ChatUI/Platforms/MacCatalyst/Entitlements.plist b/UI/ChatUI/src/ChatUI/Platforms/MacCatalyst/Entitlements.plist
deleted file mode 100644
index 24c310368..000000000
--- a/UI/ChatUI/src/ChatUI/Platforms/MacCatalyst/Entitlements.plist
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
diff --git a/UI/ChatUI/src/ChatUI/Platforms/MacCatalyst/Info.plist b/UI/ChatUI/src/ChatUI/Platforms/MacCatalyst/Info.plist
deleted file mode 100644
index 1bb02ddcd..000000000
--- a/UI/ChatUI/src/ChatUI/Platforms/MacCatalyst/Info.plist
+++ /dev/null
@@ -1,26 +0,0 @@
-
-
-
-
- UIDeviceFamily
-
- 2
-
- LSApplicationCategoryType
- public.app-category.utilities
- UISupportedInterfaceOrientations
-
- UIInterfaceOrientationPortrait
- UIInterfaceOrientationLandscapeLeft
- UIInterfaceOrientationLandscapeRight
-
- XSAppIconAssets
- Assets.xcassets/icon.appiconset
-
-
-
-
diff --git a/UI/ChatUI/src/ChatUI/Platforms/MacCatalyst/Main.maccatalyst.cs b/UI/ChatUI/src/ChatUI/Platforms/MacCatalyst/Main.maccatalyst.cs
deleted file mode 100644
index d5d3b5b65..000000000
--- a/UI/ChatUI/src/ChatUI/Platforms/MacCatalyst/Main.maccatalyst.cs
+++ /dev/null
@@ -1,16 +0,0 @@
-using UIKit;
-
-namespace ChatUI.MacCatalyst;
-
-public class EntryPoint
-{
- // This is the main entry point of the application.
- public static void Main(string[] args)
- {
- App.InitializeLogging();
-
- // if you want to use a different Application Delegate class from "AppDelegate"
- // you can specify it here.
- UIApplication.Main(args, null, typeof(App));
- }
-}
diff --git a/UI/ChatUI/src/ChatUI/Platforms/MacCatalyst/Media.xcassets/LaunchImages.launchimage/Contents.json b/UI/ChatUI/src/ChatUI/Platforms/MacCatalyst/Media.xcassets/LaunchImages.launchimage/Contents.json
deleted file mode 100644
index 69555e440..000000000
--- a/UI/ChatUI/src/ChatUI/Platforms/MacCatalyst/Media.xcassets/LaunchImages.launchimage/Contents.json
+++ /dev/null
@@ -1,58 +0,0 @@
-{
- "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/UI/ChatUI/src/ChatUI/Platforms/WebAssembly/Program.cs b/UI/ChatUI/src/ChatUI/Platforms/WebAssembly/Program.cs
index 3f7bec015..649d5831c 100644
--- a/UI/ChatUI/src/ChatUI/Platforms/WebAssembly/Program.cs
+++ b/UI/ChatUI/src/ChatUI/Platforms/WebAssembly/Program.cs
@@ -1,13 +1,17 @@
-namespace ChatUI;
+using Uno.UI.Hosting;
+namespace ChatUI;
public class Program
{
- private static App? _app;
+ public static async Task Main(string[] args)
+ {
+ App.InitializeLogging();
- public static int Main(string[] args)
- {
- Microsoft.UI.Xaml.Application.Start(_ => _app = new App());
+ var host = UnoPlatformHostBuilder.Create()
+ .App(() => new App())
+ .UseWebAssembly()
+ .Build();
- return 0;
- }
-}
+ await host.RunAsync();
+ }
+}
\ No newline at end of file
diff --git a/UI/ChatUI/src/ChatUI/Platforms/iOS/Main.iOS.cs b/UI/ChatUI/src/ChatUI/Platforms/iOS/Main.iOS.cs
index 8e899e81a..2984be526 100644
--- a/UI/ChatUI/src/ChatUI/Platforms/iOS/Main.iOS.cs
+++ b/UI/ChatUI/src/ChatUI/Platforms/iOS/Main.iOS.cs
@@ -1,16 +1,18 @@
-using UIKit;
+using Uno.UI.Hosting;
namespace ChatUI.iOS;
-
public class EntryPoint
{
- // This is the main entry point of the application.
- public static void Main(string[] args)
- {
- App.InitializeLogging();
+ // This is the main entry point of the application.
+ public static void Main(string[] args)
+ {
+ App.InitializeLogging();
+
+ var host = UnoPlatformHostBuilder.Create()
+ .App(() => new App())
+ .UseAppleUIKit()
+ .Build();
- // if you want to use a different Application Delegate class from "AppDelegate"
- // you can specify it here.
- UIApplication.Main(args, null, typeof(App));
- }
+ host.Run();
+ }
}
diff --git a/UI/ChatUI/src/ChatUI/Presentation/MessageTemplateSelector.cs b/UI/ChatUI/src/ChatUI/Presentation/MessageTemplateSelector.cs
index fcaec5565..32eff48fd 100644
--- a/UI/ChatUI/src/ChatUI/Presentation/MessageTemplateSelector.cs
+++ b/UI/ChatUI/src/ChatUI/Presentation/MessageTemplateSelector.cs
@@ -4,21 +4,21 @@ namespace ChatUI.Presentation;
public class MessageTemplateSelector : DataTemplateSelector
{
- public DataTemplate MyMessageTemplate { get; set; }
- public DataTemplate OtherMessageTemplate { get; set; }
+ public DataTemplate MyMessageTemplate { get; set; }
+ public DataTemplate OtherMessageTemplate { get; set; }
- protected override DataTemplate SelectTemplateCore(object item)
- {
- if (item != null)
- {
- return item switch
- {
- Message { IsMyMessage: true } => MyMessageTemplate,
- Message { IsMyMessage: false } => OtherMessageTemplate,
- _ => throw new InvalidOperationException(),
- };
- }
+ protected override DataTemplate SelectTemplateCore(object item)
+ {
+ if (item != null)
+ {
+ return item switch
+ {
+ Message { IsMyMessage: true } => MyMessageTemplate,
+ Message { IsMyMessage: false } => OtherMessageTemplate,
+ _ => throw new InvalidOperationException(),
+ };
+ }
- return MyMessageTemplate;
- }
+ return MyMessageTemplate;
+ }
}
diff --git a/UI/ChatUI/src/ChatUI/Platforms/Windows/Properties/PublishProfiles/win-arm64.pubxml b/UI/ChatUI/src/ChatUI/Properties/PublishProfiles/win-arm64.pubxml
similarity index 74%
rename from UI/ChatUI/src/ChatUI/Platforms/Windows/Properties/PublishProfiles/win-arm64.pubxml
rename to UI/ChatUI/src/ChatUI/Properties/PublishProfiles/win-arm64.pubxml
index d5147f103..5d5632aba 100644
--- a/UI/ChatUI/src/ChatUI/Platforms/Windows/Properties/PublishProfiles/win-arm64.pubxml
+++ b/UI/ChatUI/src/ChatUI/Properties/PublishProfiles/win-arm64.pubxml
@@ -12,11 +12,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
False
False
True
-
-
diff --git a/UI/ChatUI/src/ChatUI/Platforms/Windows/Properties/PublishProfiles/win-x64.pubxml b/UI/ChatUI/src/ChatUI/Properties/PublishProfiles/win-x64.pubxml
similarity index 74%
rename from UI/ChatUI/src/ChatUI/Platforms/Windows/Properties/PublishProfiles/win-x64.pubxml
rename to UI/ChatUI/src/ChatUI/Properties/PublishProfiles/win-x64.pubxml
index 4fea954ee..12b83447e 100644
--- a/UI/ChatUI/src/ChatUI/Platforms/Windows/Properties/PublishProfiles/win-x64.pubxml
+++ b/UI/ChatUI/src/ChatUI/Properties/PublishProfiles/win-x64.pubxml
@@ -12,11 +12,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
False
False
True
-
-
diff --git a/UI/ChatUI/src/ChatUI/Platforms/Windows/Properties/PublishProfiles/win-x86.pubxml b/UI/ChatUI/src/ChatUI/Properties/PublishProfiles/win-x86.pubxml
similarity index 84%
rename from UI/ChatUI/src/ChatUI/Platforms/Windows/Properties/PublishProfiles/win-x86.pubxml
rename to UI/ChatUI/src/ChatUI/Properties/PublishProfiles/win-x86.pubxml
index 928cb25eb..65b8f1db6 100644
--- a/UI/ChatUI/src/ChatUI/Platforms/Windows/Properties/PublishProfiles/win-x86.pubxml
+++ b/UI/ChatUI/src/ChatUI/Properties/PublishProfiles/win-x86.pubxml
@@ -12,7 +12,8 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
False
False
True
-
+ False
+ True
@@ -118,6 +118,6 @@
System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
- ChatUI
+ ChatUI-en
-
\ No newline at end of file
+
diff --git a/UI/ChatUI/src/ChatUI/Styles/AppResources.xaml b/UI/ChatUI/src/ChatUI/Styles/AppResources.xaml
index 8ab8f8bfe..6099b4b7e 100644
--- a/UI/ChatUI/src/ChatUI/Styles/AppResources.xaml
+++ b/UI/ChatUI/src/ChatUI/Styles/AppResources.xaml
@@ -1,13 +1,14 @@
-
+
-
-
-
+ -->
+
-
+
diff --git a/UI/ChatUI/src/global.json b/UI/ChatUI/src/global.json
index 694b05a75..aa87af333 100644
--- a/UI/ChatUI/src/global.json
+++ b/UI/ChatUI/src/global.json
@@ -1,9 +1,9 @@
{
// 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.4.5"
+ "Uno.Sdk": "6.2.36"
},
- "sdk":{
+ "sdk": {
"allowPrerelease": false
}
}