Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/densen2014/unoapp
Uno Platform 测试app https://platform.uno/docs/articles/getting-started-tutorial-1.html
https://github.com/densen2014/unoapp
Last synced: 11 days ago
JSON representation
Uno Platform 测试app https://platform.uno/docs/articles/getting-started-tutorial-1.html
- Host: GitHub
- URL: https://github.com/densen2014/unoapp
- Owner: densen2014
- Created: 2020-12-03T23:31:39.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2020-12-04T00:33:14.000Z (almost 4 years ago)
- Last Synced: 2024-10-05T05:20:35.199Z (about 1 month ago)
- Language: C#
- Size: 721 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# UnoApp
Uno Platform 测试app https://platform.uno/docs/articles/getting-started-tutorial-1.html# 要点
1. UWP要选择生成平台,例如X86,选AnyCPU不能正确调试
2. 编辑MainPage.xaml文件出现错误"空路径名是非法的",经查证是vs的bug,新建工程仍然不能解决就用vsc先编辑玩着吧. 参考链接 https://developercommunity.visualstudio.com/content/problem/889907/uwp-hot-reload-does-not-work-for-xaml-files-in-a-s.html
3. 各个平台要独立引用需要的库,不同平台库名称可能有所差异
4. [各平台条件编译](https://platform.uno/docs/articles/platform-specific-csharp.html)
| Platform | Symbol | 备注 |
| :----:| :----: | :----: |
| UWP | NETFX_CORE | 旧版为(WINDOWS_UWP) |
| iOS | \_\_IOS\_\_ | |
| Android | \_\_ANDROID\_\_ | |
| WebAssembly | \_\_WASM\_\_ | |
| MacOS | \_\_MACOS\_\_ | |
| Skia | \_\_SKIA\_\_ | |```
#if __ANDROID__
using _View = Android.Views.View;
#elif __IOS__
using _View = UIKit.UIView;
#else
using _View = Windows.UI.Xaml.UIElement;
#endif
```5. [多平台实现的分部类,比一大堆#if更优美,例如 NativeWrapperControl.cs , NativeWrapperControl.Android.cs, 类似razor代码后置](https://platform.uno/docs/articles/platform-specific-csharp.html)
6. [多平台显示不同文本,类似xamarin form](https://platform.uno/docs/articles/platform-specific-xaml.html)
```
```