当前位置:网站首页>(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] on May 27, 2022, MySQL is operated through pychart
- Ubuntu20.04 PostgreSQL 14 installation configuration record
- Half a year after joining the company, I was promoted to a management post
- 【论文阅读|深读】Role2Vec:Role-Based Graph Embeddings
- (04).NET MAUI实战 MVVM
- C [advanced part] C generic [need to be further supplemented: generic interfaces and instances of generic events]
- 【模糊神经网络预测】基于模糊神经网络实现水质预测含Matlab源码
- What does the hyphen mean for a block in Twig like in {% block body -%}?
- 【笔记】2022.5.28 从网页获取数据并写入数据库
- Hebb and delta learning rules
猜你喜欢

华为云原生——数据开发与DataFactory

第2章 控制结构和函数(编程题)

【笔记】2022.5.23 MySQL

Wang Shuang - assembly language learning summary

Analysis of similarities and differences of various merged features (Union, merge, append, resolve) in ArcGIS

专升本语文资源整理

实用调试技巧
![C # [advanced part] C # multithreading](/img/16/2a7c477b4cee32d9ce1e543c9d4c7e.png)
C # [advanced part] C # multithreading

TiDB 6.0:让 TSO 更高效丨TiDB Book Rush

【论文阅读|深读】DANE:Deep Attributed Network Embedding
随机推荐
.NET 7 的 JWT 配置太方便了!
(Reprinted) an article will take you to understand the reproducing kernel Hilbert space (RKHS) and various spaces
Number of students from junior college to Senior College (4)
1148_ Makefile learning_ Targets, variables, and wildcards in makefile
Chapter 2 control structure and function (programming problem)
[punch in - Blue Bridge Cup] day 2 --- format output format, ASCII
matplotlib. pyplot. Hist parameter introduction
使用IDEAL连接数据库,运行出来了 结果显示一些警告,这部分怎么处理
Ubuntu20.04 PostgreSQL 14 installation configuration record
C#【高级篇】 C# 接口(Interface)
Implementation of property management system with ssm+ wechat applet
Redis在windows系统中使用
巧用 Bitmap 实现亿级海量数据统计
【云原生】AI云开发平台——AI Model Foundry介绍(开发者可免费体验AI训练模型)
毕业设计EMS办公管理系统(B/S结构)+J2EE+SQLserver8.0
关于智能视觉组上的机械臂
I have published a book, "changing life against the sky - the way for programmers to become gods", which is open source. I have been working for ten years. There are 100 life suggestions from technica
Tidb 6.0: making Tso more efficient tidb Book rush
专升本高数(三)
C # [advanced part] C # multithreading