码迷,mamicode.com
首页 > Windows程序 > 详细

C#使用Xamarin开发(1)

时间:2017-10-12 17:03:26      阅读:233      评论:0      收藏:0      [点我收藏+]

标签:print   rect   output   nfc   int   nat   多平台   意思   common   

很早就尝试了移动开发,曾用Android studio学习了一下. 

一直没有开发的动能. vs2017开始直接可以Xamarin进行移动开发,开始尝试一下.

什么是Xamarin?Xamarin

From Wikipedia, the free encyclopedia
Xamarin is a Microsoft-owned San Francisco, California-based software company founded in May 2011[3] by the engineers that created Mono,[4] Mono for Android and MonoTouch, which are cross-platform implementations of the Common Language Infrastructure (CLI) and Common Language Specifications (often called Microsoft .NET).

With a C#-shared codebase, developers can use Xamarin tools to write native AndroidiOS, and Windows apps with native user interfaces and share code across multiple platforms, including Windows and macOS.[5]According to Xamarin, over 1.4 million developers were using Xamarin‘s products in 120 countries around the world as of April 2017.[6]

On February 24, 2016, Microsoft announced it had signed a definitive agreement to acquire Xamarin.[7]

 学习点

.Hellow world

.发布至模拟器

.发布至Android手机

.发布到Ios手机

 

那么什么是Xamarin.Forms?

(意思就是可移植的UI)

本系列介绍了Xamarin.Forms开发的基础知识,涵盖了多平台和多屏应用的构建。

Xamarin.Forms是一个允许开发人员快速创建跨平台UI界面的框架。

它为iOS,Android,Windows或Windows Phone上的原生UI呈现给用户的界面提供了自己的抽象。

这意味着你的应用程序可以共享大部分用户界面代码.

Xamarin.Forms允许快速创建应用程序,随着时间的推移,应用程序可以演变为复杂的应用程序。

由于Xamarin.Forms应用程序是原生应用程序,因此它没有其他的使用限制。

使用Xamarin.Forms编写的应用程序能够利用原生平台的任何API或功能.

例如(但不限于)iOS上的CoreMotion,PassKit和StoreKit; NFC和Android上的Google Play服务;

在Xamarin.Forms中创建UI界面有两种技术。

第一种技术是用C#源码创建UI。

第二种技术是使用可扩展应用程序标记语言(XAML),这是一种用于描述用户界面的声明式标记语言。有关XAML的更多信息,请参阅XAML基础知识。

为什么要学习Xamarin.Forms?

在移动应用发展迅速的今天,我们的APP必须要兼容多个平台,且APP的构建,主要还是构建界面(业务逻辑一般放在服务去处理)

当然,WebApp可以解决这个问题.

但是不排除我们会需要用原生的APP,然而原生的APP开发,主流平台就少不了iOS、Android、Windows10 Phone(..嗯..这个,算主流吧?好歹还活着 - -,)

每个平台我们都需要构建一次我们的界面,很繁琐,且知识点太多,学习入门会很难.所以Xamarin.Forms应运而生,一次编写,多平台编译.

[参考]

C#使用Xamarin开发(1)

标签:print   rect   output   nfc   int   nat   多平台   意思   common   

原文地址:http://www.cnblogs.com/springlee/p/7656584.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!