.NET MAUI Preview4 状态预览(5月)
MAUI Preview4
2021年5月25日, 微软发布了最新的MAUI Preview4, 在每个预览版当中, 微软都引入了更多的控制和功能。
下面将介绍目前的MAUI示例及预览版功能。
MAUI 官方示例
为了展示这个版本的一些最新进展, 巨硬迅速设计了一个简单而帅气的天气应用程序, 如下所示:
文章介绍:https://devblogs.microsoft.com/dotnet/announcing-net-maui-preview-4/
我们如果想要深入的看下, Preview4 的一些功能, 我们可以下载该项目的源代码进行调试。
调试方法: 请按照上一篇文章当中介绍的如何安装.NET 6 SDK. 以及VisualStudio 2019 Preview 等。
下载本地后的调试测试效果如下所示:
-
Win UI
-
Android
-
IOS
暂无样机
状态一览
下面将介绍在下个月的Preview 5即将发布的功能, 以及现阶段控件的完成状态。
MAUI 6月份Preview 5版本计划
- Alerts
- Animation
- AppThemeBinding (Dark Mode)
- Brushes
- CarouselView
- CollectionView
- ContentView
- Device
- DualScreen
- FlyoutPage
- Frame
- Gestures
- MessagingCenter
- Native Embedding
- Shell
- Triggers
现阶段 Preview 4 更新状态说明
图标 | 说明 |
---|---|
⚠️ | 待定 |
⏳ | 进行中 |
✅ | 完成 |
💔 | 从未在 Xamarin 中实现过 |
Pages
Control | Android | iOS / Mac Catalyst | Windows |
---|---|---|---|
ContentPage | ⏳ | ⏳ | ⏳ |
FlyoutPage | ⚠️ | ⚠️ | ⚠️ |
NavigationPage | ⏳ | ⏳ | ⏳ |
TabbedPage | ⚠️ | ⚠️ | ⚠️ |
Views
⚠️ ActivityIndicator
API | Android | iOS / Mac Catalyst | Windows |
---|---|---|---|
Color | ✅ | ✅ | ✅ |
IsRunning | ✅ | ✅ | ✅ |
⚠️ Button | |||
API | Android | iOS / Mac Catalyst | Windows |
---------------- | ------- | ------------------ | ------- |
BackgroundColor | ✅ | ✅ | ✅ |
BorderColor | ⚠️ | ⚠️ | ⚠️ |
BorderWidth | ⚠️ | ⚠️ | ⚠️ |
CharacterSpacing | ✅ | ✅ | ✅ |
Clicked | ✅ | ✅ | ✅ |
Command | ✅ | ✅ | ✅ |
CommandParameter | ✅ | ✅ | ✅ |
ContentLayout | ⚠️ | ⚠️ | ⚠️ |
CornerRadius | ⚠️ | ⚠️ | ⚠️ |
FontAttributes | ✅ | ✅ | ✅ |
FontFamily | ✅ | ✅ | ✅ |
FontSize | ✅ | ✅ | ✅ |
ImageSource | ⚠️ | ⚠️ | ⚠️ |
Padding | ✅ | ✅ | ✅ |
Pressed | ✅ | ✅ | ✅ |
Released | ✅ | ✅ | ✅ |
Text | ✅ | ✅ | ✅ |
TextColor | ✅ | ✅ | ✅ |
⚠️ CarouselView | |||
API | Android | iOS / Mac Catalyst | Windows |
---------------------------------- | ------- | ------------------ | ------- |
CurrentItem | ⚠️ | ⚠️ | ⚠️ |
CurrentItemChangedCommand | ⚠️ | ⚠️ | ⚠️ |
CurrentItemChangedCommandParameter | ⚠️ | ⚠️ | ⚠️ |
IndicatorView | ⚠️ | ⚠️ | ⚠️ |
IsBounceEnabled | ⚠️ | ⚠️ | ⚠️ |
IsDragging | ⚠️ | ⚠️ | ⚠️ |
IsScrollAnimated | ⚠️ | ⚠️ | ⚠️ |
IsSwipeEnabled | ⚠️ | ⚠️ | ⚠️ |
ItemsLayout | ⚠️ | ⚠️ | ⚠️ |
Loop | ⚠️ | ⚠️ | ⚠️ |
PeekAreaInsets | ⚠️ | ⚠️ | ⚠️ |
Position | ⚠️ | ⚠️ | ⚠️ |
PositionChangedCommand | ⚠️ | ⚠️ | ⚠️ |
PositionChangedCommandParameter | ⚠️ | ⚠️ | ⚠️ |
VisibleViews | ⚠️ | ⚠️ | ⚠️ |
⚠️ CheckBox | |||
API | Android | iOS / Mac Catalyst | Windows |
-------------- | ------- | ------------------ | ------- |
Color | ⚠️ | ⚠️ | ⚠️ |
CheckedChanged | ✅ | ✅ | ✅ |
IsChecked | ✅ | ✅ | ✅ |
⚠️ CollectionView | |||
API | Android | iOS / Mac Catalyst | Windows |
-------------------------------- | ------- | ------------------ | ------- |
ItemsSource | ⚠️ | ⚠️ | ⚠️ |
ItemTemplate | ⚠️ | ⚠️ | ⚠️ |
ItemsPanel | ⚠️ | ⚠️ | ⚠️ |
ItemSizingStrategy | ⚠️ | ⚠️ | ⚠️ |
SelectionMode | ⚠️ | ⚠️ | ⚠️ |
SelectedItem | ⚠️ | ⚠️ | ⚠️ |
SelectedItems | ⚠️ | ⚠️ | ⚠️ |
SelectionChangedCommand | ⚠️ | ⚠️ | ⚠️ |
SelectionChangedCommandParameter | ⚠️ | ⚠️ | ⚠️ |
EmptyView | ⚠️ | ⚠️ | ⚠️ |
Scrolled | ⚠️ | ⚠️ | ⚠️ |
ScrollTo | ⚠️ | ⚠️ | ⚠️ |
Header | ⚠️ | ⚠️ | ⚠️ |
HeaderTemplate | ⚠️ | ⚠️ | ⚠️ |
Footer | ⚠️ | ⚠️ | ⚠️ |
FooterTemplate | ⚠️ | ⚠️ | ⚠️ |
IsGrouped | ⚠️ | ⚠️ | ⚠️ |
GroupHeaderTemplate | ⚠️ | ⚠️ | ⚠️ |
GroupFooterTemplate | ⚠️ | ⚠️ | ⚠️ |
⚠️ DatePicker | |||
API | Android | iOS / Mac Catalyst | Windows |
---------------- | ------- | ------------------ | ------- |
BackgroundColor | ✅ | ✅ | ⚠️ |
CharacterSpacing | ✅ | ✅ | ✅ |
Date | ✅ | ✅ | ✅ |
DateSelected | ✅ | ✅ | ✅ |
FontAttributes | ✅ | ✅ | ✅ |
FontFamily | ✅ | ✅ | ✅ |
FontSize | ✅ | ✅ | ✅ |
Format | ✅ | ✅ | ✅ |
MaximumDate | ✅ | ✅ | ✅ |
MinimumDate | ✅ | ✅ | ✅ |
TextColor | ✅ | ✅ | ⚠️ |
⚠️ Editor | |||
API | Android | iOS / Mac Catalyst | Windows |
----------------------- | ------- | ------------------ | ------- |
AutoSize | ⚠️ | ⚠️ | ⚠️ |
Completed | ✅ | ✅ | ✅ |
CharacterSpacing | ✅ | ✅ | ⚠️ |
FontAttributes | ✅ | ✅ | ✅ |
FontFamily | ✅ | ✅ | ✅ |
FontSize | ✅ | ✅ | ✅ |
IsReadOnly | ✅ | ✅ | ⏳ |
IsTextPredictionEnabled | ✅ | ✅ | ⚠️ |
PlaceHolder | ✅ | ✅ | ⚠️ |
PlaceHolderColor | ✅ | ✅ | ⚠️ |
Text | ✅ | ✅ | ⏳ |
TextColor | ✅ | ✅ | ⚠️ |
MaxLength | ✅ | ✅ | ✅ |
⚠️ Entry | |||
API | Android | iOS / Mac Catalyst | Windows |
----------------------- | ------- | ------------------ | ------- |
ClearButtonVisibility | ✅ | ✅ | ⚠️ |
CharacterSpacing | ✅ | ✅ | ⚠️ |
Completed | ⏳ | ⏳ | ⏳ |
CursorPosition | ⚠️ | ⚠️ | ⚠️ |
FontAttributes | ✅ | ✅ | ⚠️ |
FontFamily | ✅ | ✅ | ⚠️ |
FontSize | ✅ | ✅ | ⚠️ |
HorizontalTextAlignment | ✅ | ✅ | ⚠️ |
IsTextPredictionEnabled | ✅ | ✅ | ⚠️ |
IsPassword | ✅ | ✅ | ⏳ |
PlaceHolder | ✅ | ✅ | ✅ |
PlaceHolderColor | ⚠️ | ⚠️ | ⚠️ |
VerticalTextAlignment | ⏳ | ⏳ | ⚠️ |
ReturnCommand | ⚠️ | ⚠️ | ⚠️ |
ReturnCommandParameter | ⚠️ | ⚠️ | ⚠️ |
ReturnType | ✅ | ✅ | ⏳ |
SelectionLength | ⚠️ | ⚠️ | ⚠️ |
Text | ✅ | ✅ | ✅ |
TextColor | ✅ | ✅ | ⚠️ |
⚠️ Frame | |||
API | Android | iOS / Mac Catalyst | Windows |
------------ | ------- | ------------------ | ------- |
BorderColor | ⏳ | ⏳ | ⚠️ |
CornerRadius | ⏳ | ⏳ | ⚠️ |
HasShadow | ⏳ | ⏳ | ⚠️ |
⚠️ IndicatorView | |||
API | Android | iOS / Mac Catalyst | Windows |
---------------------- | ------- | ------------------ | ------- |
IndicatorColor | ⚠️ | ⚠️ | ⚠️ |
IndicatorLayout | ⚠️ | ⚠️ | ⚠️ |
IndicatorSize | ⚠️ | ⚠️ | ⚠️ |
IndicatorShape | ⚠️ | ⚠️ | ⚠️ |
IndicatorTemplate | ⚠️ | ⚠️ | ⚠️ |
ItemsSource | ⚠️ | ⚠️ | ⚠️ |
MinimumVisible | ⚠️ | ⚠️ | ⚠️ |
Position | ⚠️ | ⚠️ | ⚠️ |
SelectedIndicatorColor | ⚠️ | ⚠️ | ⚠️ |
⚠️ Image | |||
API | Android | iOS / Mac Catalyst | Windows |
--------- | ------- | ------------------ | ------- |
Aspect | ✅ | ✅ | ✅ |
IsLoading | ✅ | ✅ | ✅ |
Source | ✅ | ✅ | ✅ |
⚠️ ImageButton | |||
API | Android | iOS / Mac Catalyst | Windows |
---------------- | ------- | ------------------ | ------- |
BorderColor | ⚠️ | ⚠️ | ⚠️ |
BorderWidth | ⚠️ | ⚠️ | ⚠️ |
Command | ⚠️ | ⚠️ | ⚠️ |
CommandParameter | ⚠️ | ⚠️ | ⚠️ |
CornerRadius | ⚠️ | ⚠️ | ⚠️ |
IsLoading | ⚠️ | ⚠️ | ⚠️ |
IsOpaque | ⚠️ | ⚠️ | ⚠️ |
IsPressed | ⚠️ | ⚠️ | ⚠️ |
Padding | ⚠️ | ⚠️ | ⚠️ |
Source | ⚠️ | ⚠️ | ⚠️ |
Clicked | ⚠️ | ⚠️ | ⚠️ |
Pressed | ⚠️ | ⚠️ | ⚠️ |
Released | ⚠️ | ⚠️ | ⚠️ |
⚠️ Label | |||
API | Android | iOS / Mac Catalyst | Windows |
----------------------- | ------- | ------------------ | ------- |
CharacterSpacing | ✅ | ✅ | ✅ |
Font | ✅ | ✅ | ✅ |
FontAttributes | ✅ | ✅ | ✅ |
FontFamily | ✅ | ✅ | ✅ |
FontSize | ✅ | ✅ | ✅ |
FormattedText | ✅ | ✅ | ⚠️ |
HorizontalTextAlignment | ✅ | ✅ | ✅ |
LineBreakMode | ✅ | ✅ | ✅ |
LineHeight | ✅ | ✅ | ✅ |
MaxLines | ✅ | ✅ | ✅ |
Padding | ✅ | ✅ | ✅ |
Text | ✅ | ✅ | ✅ |
TextColor | ✅ | ✅ | ✅ |
TextDecorations | ✅ | ✅ | ⏳ |
TextType | ⏳ | ⏳ | ⏳ |
VerticalTextAlignment | ⚠️ | ⚠️ | ⚠️ |
⚠️ Map | |||
API | Android | iOS / Mac Catalyst | Windows |
-------------------- | ------- | ------------------ | ------- |
HasScrollEnabled | ⚠️ | ⚠️ | ⚠️ |
HasZoomEnabled | ⚠️ | ⚠️ | ⚠️ |
IsShowingUser | ⚠️ | ⚠️ | ⚠️ |
ItemsSource | ⚠️ | ⚠️ | ⚠️ |
ItemTemplate | ⚠️ | ⚠️ | ⚠️ |
ItemTemplateSelector | ⚠️ | ⚠️ | ⚠️ |
LastMoveToRegion | ⚠️ | ⚠️ | ⚠️ |
MapType | ⚠️ | ⚠️ | ⚠️ |
Pins | ⚠️ | ⚠️ | ⚠️ |
TrafficEnabled | ⚠️ | ⚠️ | ⚠️ |
VisibleRegion | ⚠️ | ⚠️ | ⚠️ |
MoveToRegion | ⚠️ | ⚠️ | ⚠️ |
MapClicked | ⚠️ | ⚠️ | ⚠️ |
⚠️ Picker | |||
API | Android | iOS / Mac Catalyst | Windows |
----------------------- | ------- | ------------------ | ------- |
CharacterSpacing | ✅ | ✅ | ✅ |
FontAttributes | ✅ | ✅ | ✅ |
FontFamily | ✅ | ✅ | ✅ |
FontSize | ✅ | ✅ | ✅ |
HorizontalTextAlignment | ⚠️ | ⚠️ | ⚠️ |
ItemDisplayBinding | ✅ | ✅ | ⚠️ |
Items | ✅ | ✅ | ✅ |
ItemsSource | ✅ | ✅ | ✅ |
SelectedIndex | ✅ | ✅ | ✅ |
SelectedIndexChanged | ⚠️ | ⚠️ | ⚠️ |
SelectedItem | ✅ | ✅ | ⚠️ |
TextColor | ✅ | ✅ | ⏳ |
Title | ✅ | ✅ | ✅ |
TitleColor | ⏳ | ⏳ | ⚠️ |
VerticalTextAlignment | ⚠️ | ⚠️ | ⚠️ |
⚠️ ProgressBar | |||
API | Android | iOS / Mac Catalyst | Windows |
------------- | ------- | ------------------ | ------- |
Progress | ✅ | ✅ | ⏳ |
ProgressColor | ⏳ | ⏳ | ⚠️ |
ProgressTo | ⚠️ | ⚠️ | ⚠️ |
⚠️ RadioButton | |||
API | Android | iOS / Mac Catalyst | Windows |
-------------- | ------- | ------------------ | ------- |
CheckedChanged | ⚠️ | ⚠️ | ⚠️ |
GroupName | ⚠️ | ⚠️ | ⚠️ |
IsChecked | ⏳ | ⏳ | ⚠️ |
⚠️ RefreshView | |||
API | Android | iOS / Mac Catalyst | Windows |
---------------- | ------- | ------------------ | ------- |
Command | ⚠️ | ⚠️ | ⚠️ |
CommandParameter | ⚠️ | ⚠️ | ⚠️ |
IsRefreshing | ⚠️ | ⚠️ | ⚠️ |
RefreshColor | ⚠️ | ⚠️ | ⚠️ |
Refreshing | ⚠️ | ⚠️ | ⚠️ |
⚠️ SearchBar | |||
API | Android | iOS / Mac Catalyst | Windows |
----------------------- | ------- | ------------------ | ------- |
BackgroundColor | ✅ | ✅ | ⚠️ |
CharacterSpacing | ✅ | ✅ | ⏳ |
CancelButtonColor | ⚠️ | ⚠️ | ⚠️ |
FontAttributes | ✅ | ✅ | ⚠️ |
FontSize | ✅ | ✅ | ⚠️ |
HorizontalTextAlignment | ✅ | ✅ | ⚠️ |
MaxLength | ✅ | ✅ | ⏳ |
SearchCommand | ⚠️ | ⚠️ | ⚠️ |
SearchCommandParameter | ⚠️ | ⚠️ | ⚠️ |
Text | ✅ | ✅ | ⏳ |
TextColor | ✅ | ✅ | ⚠️ |
VerticalTextAlignment | ⚠️ | ⚠️ | ⚠️ |
⚠️ Shapes | |||
API | Android | iOS / Mac Catalyst | Windows |
---------------- | ------- | ------------------ | ------- |
Fill | ⏳ | ⏳ | ⚠️ |
Stroke | ⏳ | ⏳ | ⚠️ |
StrokeDashArray | ⏳ | ⏳ | ⚠️ |
StrokeDashOffset | ⏳ | ⏳ | ⚠️ |
StrokeLineCap | ⏳ | ⏳ | ⚠️ |
StrokeLineJoin | ⏳ | ⏳ | ⚠️ |
StrokeMiterLimit | ⏳ | ⏳ | ⚠️ |
StrokeThickness | ⏳ | ⏳ | ⚠️ |
⚠️ Slider | |||
API | Android | iOS / Mac Catalyst | Windows |
-------------------- | ------- | ------------------ | ------- |
DragCompleted | ✅ | ✅ | ✅ |
DragCompletedCommand | ✅ | ⚠️ | ✅ |
DragStarted | ✅ | ✅ | ✅ |
DragStartedCommand | ✅ | ✅ | ✅ |
Maximum | ✅ | ✅ | ✅ |
MaximumTrackColor | ✅ | ✅ | ✅ |
Minimum | ✅ | ✅ | ✅ |
MinimumTrackColor | ✅ | ✅ | ✅ |
ThumbColor | ✅ | ✅ | ⚠️ |
Value | ✅ | ✅ | ✅ |
ValueChanged | ✅ | ✅ | ✅ |
⚠️ Stepper | |||
API | Android | iOS / Mac Catalyst | Windows |
------------ | ------- | ------------------ | ------- |
Increment | ✅ | ✅ | ✅ |
Maximum | ✅ | ✅ | ✅ |
Minimum | ✅ | ✅ | ✅ |
Value | ✅ | ✅ | ✅ |
ValueChanged | ✅ | ✅ | ✅ |
⚠️ SwipeView | |||
API | Android | iOS / Mac Catalyst | Windows |
----------- | ------- | ------------------ | ------- |
BottomItems | ⚠️ | ⚠️ | ⚠️ |
LeftItems | ⚠️ | ⚠️ | ⚠️ |
RightItems | ⚠️ | ⚠️ | ⚠️ |
TopItems | ⚠️ | ⚠️ | ⚠️ |
⚠️ Switch | |||
API | Android | iOS / Mac Catalyst | Windows |
---------- | ------- | ------------------ | ------- |
IsToggled | ✅ | ✅ | ✅ |
OnColor | ✅ | ✅ | ⏳ |
ThumbColor | ✅ | ✅ | ⏳ |
⚠️ TimePicker | |||
API | Android | iOS / Mac Catalyst | Windows |
---------------- | ------- | ------------------ | ------- |
BackgroundColor | ✅ | ✅ | ⚠️ |
CharacterSpacing | ✅ | ✅ | ⏳ |
FontAttributes | ✅ | ✅ | ⏳ |
FontFamily | ✅ | ✅ | ⏳ |
FontSize | ✅ | ✅ | ⏳ |
Format | ✅ | ✅ | ⏳ |
Time | ✅ | ✅ | ✅ |
TextColor | ✅ | ✅ | ⚠️ |
⚠️ WebView | |||
API | Android | iOS / Mac Catalyst | Windows |
----------------------- | ------- | ------------------ | ------- |
CanGoBack | ⚠️ | ⚠️ | ⚠️ |
CanGoForward | ⚠️ | ⚠️ | ⚠️ |
Cookies | ⚠️ | ⚠️ | ⚠️ |
Source | ⏳ | ⏳ | ⚠️ |
Eval | ⚠️ | ⚠️ | ⚠️ |
EvaluateJavaScriptAsync | ⚠️ | ⚠️ | ⚠️ |
GoBack | ⚠️ | ⚠️ | ⚠️ |
GoForward | ⚠️ | ⚠️ | ⚠️ |
Reload | ⚠️ | ⚠️ | ⚠️ |
Layouts | |||
Layout | Android | iOS / Mac Catalyst | Windows |
---------------- | ------- | ------------------ | ------- |
AbsoluteLayout | ⚠️ | ⚠️ | ⚠️ |
ContentPresenter | ⚠️ | ⚠️ | ⚠️ |
ContentView | ⚠️ | ⚠️ | ⚠️ |
FlexLayout | ⚠️ | ⚠️ | ⚠️ |
Grid | ⏳ | ⏳ | ⏳ |
RelativeLayout | ⚠️ | ⚠️ | ⚠️ |
ScrollView | ⚠️ | ⚠️ | ⚠️ |
StackLayout | ⏳ | ⏳ | ⏳ |
TemplatedView | ⚠️ | ⚠️ | ⚠️ |
Features | |||
Feature | Android | iOS / Mac Catalyst | Windows |
--------------------------------------------------------- | ------- | ------------------ | ------- |
Accessibility | ⏳ | ⏳ | ⏳ |
Animation | ⏳ | ⏳ | ⏳ |
Border Everywhere | ⏳ | ⏳ | ⏳ |
Brushes Everywhere | ⏳ | ⏳ | ⏳ |
CornerRadius Everywhere | ⏳ | ⏳ | ⏳ |
Device | ⚠️ | ⚠️ | ⚠️ |
Gestures | ⏳ | ⏳ | ⏳ |
ImageHandlers | ✅ | ✅ | ✅ |
Interactivity (Behaviors, Triggers, Visual State Manager) | ⚠️ | ⚠️ | ⚠️ |
FlowDirection (RTL) | ⏳ | ⏳ | ⏳ |
Fonts | ✅ | ✅ | ✅ |
Lifecycle Events | ⏳ | ⏳ | ⏳ |
Themes | ⚠️ | ⚠️ | ⚠️ |
Shell | ⏳ | ⏳ | ⏳ |
Styles | ✅ | ✅ | ✅ |
View Transforms | ⏳ | ⏳ | ⏳ |