当前位置:网站首页>(03). Net Maui actual combat basic control
(03). Net Maui actual combat basic control
2022-06-30 03:48:00 【Dotnet cross platform】
1. Summary
This chapter will continue to introduce .NET MAUI Common basic controls in , Let's just touch MAUI My little friend has a basic understanding of writing , It will be handy to have a solid foundation in mind . Some common basic controls are listed below :
| Control name | Chinese name | explain |
|---|---|---|
| Button | Button | And WPF There is not much change in the basic usage of |
| CheckBox | Radio buttons | And WPF There is not much change in the basic usage of |
| ListView | list | similar WPF List control in “ListBox” |
| ImageButton | Picture button | WPF The control does not exist in , Usually developers need to implement it manually ,MAUI Is already contained in the underlying control . |
| Entry | Input box | similar WPF Input box control in “TextBox” |
| TableView | tab | similar WPF in "TabControl" |
| DisplayAlert | Message box | similar WPF in “MessageBox” |
2. The detailed content
(1)Button

xaml grammar :
<Button Text=" I am a Btn" WidthRequest="200" HeightRequest="50" Command="{Binding OkCommand}" CommandParameter="{Binding}"/>(2)CheckBox
uncheck state

check state

xaml grammar :
<CheckBox IsChecked="True"/>(3)ListView

xaml grammar 1:
<ListView ItemsSource="{Binding Temps}" HeightRequest="500" WidthRequest="300"/>xaml grammar 2:
<ListView HeightRequest="500" WidthRequest="300">
<ListView.ItemTemplate>
<DataTemplate>
<ViewCell>
<Label Text=" I am a listview item1" TextColor="Red"></Label>
</ViewCell>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>(4)ImageButton

xaml grammar :
<ImageButton Source="/img/1.jpg" WidthRequest="200" HeightRequest="50" Command="{Binding OkCommand}" CommandParameter="{Binding}"/>(5)Entry

xaml grammar :
<Entry Text=" I am the input field " WidthRequest="100" HeightRequest="50"/>(6) TableView

xaml grammar :
<TableView HasUnevenRows="True">
<TableView.Root>
<TableSection TextColor="Red" Title="Tab1">
//Cell You can put other content in the
<TextCell TextColor="Red" Text="Item1"></TextCell>
<TextCell TextColor="Red" Text="Item2" IsEnabled="False"></TextCell>
</TableSection>
<TableSection TextColor="Blue" Title="Tab2">
<TextCell TextColor="Blue" Text="Item1"></TextCell>
<TextCell TextColor="Blue" Text="Item2" Detail="test">
<TextCell.ContextActions>
<MenuItem Text="More"></MenuItem>
<MenuItem Text="Delete"></MenuItem>
</TextCell.ContextActions>
</TextCell>
</TableSection>
</TableView.Root>
</TableView>(6) DisplayAlert

C# grammar :
DisplayAlert(" New news "," Happy New Year! ","ok");边栏推荐
猜你喜欢

专升本高数(三)
![[Note] ab Test and Variance Analysis](/img/f2/58369a99514d37d5af335a61d0911f.jpg)
[Note] ab Test and Variance Analysis

Radiant energy, irradiance and radiance

laravel9本地安裝

【笔记】AB测试和方差分析

December2020 - true questions and analysis of C language (Level 2) in the youth level examination of the Electronic Society

毕业设计EMS办公管理系统(B/S结构)+J2EE+SQLserver8.0

Redis中的Hash设计和节省内存数据结构设计

学校实训要做一个注册页面,要打开数据库把注册页面输入的内容存进数据库但是

UML图与List集合
随机推荐
专升本高数(三)
The next change direction of database - cloud native database
C [advanced part] C generic [need to be further supplemented: generic interfaces and instances of generic events]
[punch in - Blue Bridge Cup] day 1 --% 7F format output
深入浅出掌握grpc通信框架
.NET 7 的 JWT 配置太方便了!
DO280私有仓库持久存储与章节实验
Number of students from junior college to Senior College (III)
[punch in - Blue Bridge Cup] day 4--------- split ('') cannot be used. There is a space after the last number of test cases. Split ()
What does the hyphen mean for a block in Twig like in {% block body -%}?
C#【高级篇】 C# 多线程
The 5-year Android development interview took 20 days to join Alibaba
[personal summary] learning plan
C [advanced] C interface
Realization of BFS in C language by storing adjacency matrix of graph
unity input system 使用记录(实例版)
Semantic segmentation resources
共124篇!墨天轮“高可用架构”干货文档分享(含Oracle、MySQL、PG)
2021-07-05
Number of students from junior college to Senior College (4)