Windows Platform Features
Developing Xamarin.Forms applications for Windows platforms requires Visual Studio. The supported platforms page contains more information about the pre-requisites.
Platform-specifics
Platform-specifics allow you to consume functionality that's only available on a specific platform, without implementing custom renderers or effects.
The following platform-specific functionality is provided for Xamarin.Forms views, pages, and layouts on the Universal Windows Platform (UWP):
- Setting an access key for a
VisualElement
. For more information, see VisualElement Access Keys on Windows. - Disabling legacy color mode on a supported
VisualElement
. For more information, see VisualElement Legacy Color Mode on Windows.
The following platform-specific functionality is provided for Xamarin.Forms views on UWP:
- Detecting reading order from text content in
Entry
,Editor
, andLabel
instances. For more information, see InputView Reading Order on Windows. - Enabling tap gesture support in a
ListView
. For more information, see ListView SelectionMode on Windows. - Enabling the pull direction of a
RefreshView
to be changed. For more information, see RefreshView Pull Direction on Windows. - Enabling a
SearchBar
to interact with the spell check engine. For more information, see SearchBar Spell Check on Windows. - Setting the thread on which a
WebView
hosts its content. For more information, see WebView Execution Mode on Windows. - Enabling a
WebView
to display JavaScript alerts in a UWP message dialog. For more information, see WebView JavaScript Alerts on Windows.
The following platform-specific functionality is provided for Xamarin.Forms pages on UWP:
- Collapsing the
FlyoutPage
navigation bar. For more information, see FlyoutPage Navigation Bar on Windows. - Setting toolbar placement options. For more information, see Page Toolbar Placement on Windows.
- Enabling page icons to be displayed on a
TabbedPage
toolbar. For more information, see TabbedPage Icons on Windows.
The following platform-specific functionality is provided for the Xamarin.Forms Application
class on UWP:
- Specifying the directory in the project that image assets will be loaded from. For more information, see Default Image Directory on Windows.
Platform support
The Xamarin.Forms templates available in Visual Studio contain a Universal Windows Platform (UWP) project.
Note
Xamarin.Forms 1.x and 2.x support Windows Phone 8 Silverlight, Windows Phone 8.1, and Windows 8.1 application development. However, these project types have been deprecated.
Getting started
Go to File > New > Project in Visual Studio and choose one of the Cross-Platform > Blank App (Xamarin.Forms) templates to get started.
Older Xamarin.Forms solutions, or those created on macOS, will not have all the Windows projects listed above (but they need to be manually added). If the Windows platform you wish to target isn't already in your solution, visit the setup instructions to add the desired Windows project type/s.
Samples
All the samples for Charles Petzold's book Creating Mobile Apps with Xamarin.Forms include Universal Windows Platform (for Windows 10) projects.
The "Scott Hanselman" demo app is available separately, and also includes Apple Watch and Android Wear projects (using Xamarin.iOS and Xamarin.Android respectively, Xamarin.Forms does not run on those platforms).