Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sswi/AcrylicView.MAUI
.Net Maui平台实现的亚克力效果视图,支持Windows、Android、iOS\MacOS,AcrylicView, Supported:Windows,Android,iOS,Mac
https://github.com/sswi/AcrylicView.MAUI
Last synced: 3 months ago
JSON representation
.Net Maui平台实现的亚克力效果视图,支持Windows、Android、iOS\MacOS,AcrylicView, Supported:Windows,Android,iOS,Mac
- Host: GitHub
- URL: https://github.com/sswi/AcrylicView.MAUI
- Owner: sswi
- License: mit
- Created: 2023-03-27T10:58:08.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2024-02-24T11:04:19.000Z (9 months ago)
- Last Synced: 2024-04-26T14:21:17.411Z (7 months ago)
- Language: C#
- Homepage:
- Size: 3.27 MB
- Stars: 130
- Watchers: 4
- Forks: 10
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
- awesome-dotnet-maui - AcrylicView.MAUI - square)](https://github.com/sswi/AcrylicView.MAUI/stargazers)|[![GitHub last-commit](https://img.shields.io/github/last-commit/sswi/AcrylicView.MAUI?style=flat-square)](https://github.com/sswi/AcrylicView.MAUI/commits) (UI)
README
|支持平台/Supported platforms |
|----------------------------|
| :heavy_check_mark: Android |
| :heavy_check_mark: iOS |
| :heavy_check_mark: macOS |
| :heavy_check_mark: Windows |温馨提示:在 windows的安卓子系统 中无法正常显示
Tips:Does not work in the Windows subsystem for AndroidNugetPackage:AcrylicView.Maui
![231667033-e99ed65b-d74a-4e70-9e89-0958afdc5e45](https://github.com/sswi/AcrylicView.MAUI/assets/39110708/1e05f06c-7d43-403a-8f83-74d9436c44f3)
MauiProgram.cs```csharp
using Xe.AcrylicView; //***1.引入 |import
public static class MauiProgram
{
public static MauiApp CreateMauiApp()
{
var builder = MauiApp.CreateBuilder();
builder
.UseMauiApp()
.UseAcrylicView() //*********2.添加此扩展方法使用 | Usage
.ConfigureFonts(fonts =>
{
fonts.AddFont("OpenSans-Regular.ttf", "OpenSansRegular");
fonts.AddFont("OpenSans-Semibold.ttf", "OpenSansSemibold");
});
return builder.Build();
}
}
}
```
```xml
xmlns:ui="clr-namespace:Xe.AcrylicView;assembly=Xe.AcrylicView"
```
| 属性名 / Property Name | 类型 / Type | 描述 / Detail | 默认值 / Default |
| ------------- | ------------- | ------------- | ------------- |
| 效果 / EffectStyle | 枚举 / Enumeration | ExtraLight,Light,Dark,ExtraDark,Custom | 亮效果 / Light |
| 色调 / TintColor | 颜色 / Color | 混合颜色 / Colors | 透明色 / Transparent |
| 色调深度 / TintOpacity | 双精度小数 / double | 色调不透明度 / Opacity | 透明 / 0.0 |
| 边框颜色 / BorderColor | 颜色 / Color | Colors | 透明色 / Transparent |
| 边框厚度 / BorderThickness | 厚度 / Thickness | Thickness | 无边框 / Thickness(0) |
| 圆角半径 / CornerRadius | 厚度 / Thickness | Thickness | 直角 / Thickness(0) |Android平台的实现方式是从这个仓库获取,从Xamarin.Forms简单移植过来的,请支持原作者:
https://github.com/roubachof/Sharpnado.MaterialFrame