Xamarin 行動裝置應用程式開發Xamarin mobile app development

Xamarin 的第一級支援可讓您開發 Android、macOS、iOS、tvOS 和 watchOS 的豐富原生體驗。First-class support for Xamarin allows you to develop rich native experiences for Android, macOS, iOS, tvOS, and watchOS. Xamarin.Forms 跨平台應用程式可協助您在 Android、iOS 與 macOS 之間共用 XAML UI 程式碼,而不限制原生功能的存取權。Xamarin.Forms cross-platform applications help you share XAML-based UI code between Android, iOS, and macOS without limiting access to native functionality.

Xamarin.FormsXamarin.Forms

適用于 Xamarin 的 XAML 熱重載。表單內建于8.3 版和更新版本中的 Visual Studio for Mac。XAML Hot Reload for Xamarin.Forms is built into Visual Studio for Mac in version 8.3 and later. 啟用這項功能後,每次您儲存檔案時,變更都會立即反映在執行中的應用程式中。With this feature enabled changes are instantly reflected in your running app every time you save the file.

若要啟用 XAML 熱重載,可以在Visual Studio > 喜好設定 > 專案 > Xamarin 熱重載] 上,勾選 [啟用 Xamarin 熱重載] 核取方塊。XAML Hot Reload can be enabled by checking the Enable Xamarin Hot Reload checkbox at Visual Studio > Preferences > Projects > Xamarin Hot Reload.

如需有關熱重載的詳細資訊,請參閱檔中的適用于Xamarin 的 XAML 熱重載指南For more information on Hot Reload, see the XAML Hot Reload for Xamarin.Forms guide within the documentation.

AndroidAndroid

Visual Studio for Mac 有其專屬整合式 Android SDK 管理員,可讓您存取您希望您應用程式作為目標的 SDK。Visual Studio for Mac has its own integrated Android SDK manager, allowing you access to the SDKs you want your app to target.

對於 Android 應用程式,Visual Studio for Mac 包括自己的設計工具,可使用 Android 的 .axml 檔案,以視覺化方式建構使用者介面。For Android applications, Visual Studio for Mac includes its own designer, which works with Android .axml files to visually construct user interfaces. Visual Studio for Mac 會在自己的 Android Designer 中開啟這些檔案,如下圖所示:Visual Studio for Mac will open these files in its Android Designer, as illustrated in the following image:

Android UI 設計工具

如需 Android Designer 的詳細資訊,請參閱 Xamarin.Android Designer Overview (Xamarin.Android 設計工具概觀) 指南。For more information on the Android Designer, see the Xamarin.Android Designer Overview guide.

iOSiOS

iOS 設計工具已與 Visual Studio for Mac 完全整合在一起,以視覺化編輯 .xib 和分鏡腳本檔案來建立 iOS、tvOS 和 WatchOS UI 和轉換。The iOS Designer is fully integrated with Visual Studio for Mac and enables visual editing of .xib and Storyboard files to create iOS, tvOS, and WatchOS UIs and transitions. 整個使用者介面都可以使用工具箱和設計介面之間的拖放功能建置,同時使用直覺式方法來處理事件。The entire user interface can be built using drag-and-drop functionality between the Toolbox and Design Surface, while using an intuitive approach to handling events. iOS 設計工具也利用設計階段轉譯支援自訂控制項The iOS Designer also supports custom controls with the added benefit of design-time rendering.

iOS 分鏡腳本設計工具

如需使用 iOS 詳細資訊,請參閱 Designer (設計工具) 指南。For more information on using the iOS Designer, see the Designer guides.

MacMac

Xamarin 提供可讓您建立美觀 Mac 應用程式的原生 Mac API 繫結。Xamarin provides native Mac API bindings that allow you to create beautiful Mac applications.

如需使用 Visual Studio for Mac 撰寫 Mac 應用程式的詳細資訊,請參閱 Xamarin.Mac 指南。For more information on writing Mac applications with Visual Studio for Mac, refer to the Xamarin.Mac guides.

Xamarin 企業功能Xamarin Enterprise features

注意

這些產品只能搭配 Visual Studio Enterprise 訂閱使用。These products can only be used with a Visual Studio Enterprise subscription.

分析工具Profiler

Xamarin Profiler 有三種工具可供分析所用。The Xamarin Profiler has three instruments available for profiling. Xamarin Profiler 簡介指南探討這些工具測量的內容,以及它們如何分析您的應用程式,並釐清每個畫面上顯示的資料意義。The Introduction to the Xamarin Profiler guide explores what these instruments measure and how they analyze your application, and clarifies the meaning of the data presented on each screen.

InspectorInspector

Xamarin Inspector 提供互動式的 C# 主控台與使用者工具。The Xamarin Inspector provides an interactive C# console with user tools. 它可以當作檢查即時應用程式時的偵錯或診斷輔助工具、教學工具、記錄工具或試驗工具。It can be used as a debugging or diagnostics aid when inspecting live applications, as a teaching tool, as a documentation tool, or an experimentation tool.

Xamarin Inspector

其包含的獨立應用程式,提供以各種程式設計平台 (Android、iOS、Mac 和 Windows) 為目標的多功能 C# 主控台,並整合到您的 IDE 偵錯工作流程中。It consists of a standalone application that provides a rich C# console that can target various programming platforms (Android, iOS, Mac, and Windows) and integrate into your IDEs debugging workflow.

如需詳細資訊,請參閱 Xamarin Inspector 指南。For more information, see the Xamarin Inspector guide.