1
0
Форкнуть 0

update readme for samples browser (#7)

* update samples page content

* update readme

* fix/add docs links
This commit is contained in:
Craig Dunn 2020-08-11 12:24:03 -07:00 коммит произвёл GitHub
Родитель 2ea68533a8
Коммит fd2c5c8056
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
3 изменённых файлов: 30 добавлений и 6 удалений

Просмотреть файл

@ -1,25 +1,49 @@
---
page_type: sample
name: Surface Duo - Xamarin samples
name: Surface Duo - Xamarin SDK samples
languages:
- csharp
products:
- surface-duo
- xamarin
description: "Learn to develop dual-screen apps for Surface Duo with Xamarin and Xamarin.Forms."
description: "Samples showing how to use the Surface Duo SDK to achieve dual-screen user interface patterns using Xamarin and Xamarin.Forms."
urlFragment: all
---
# Surface Duo - Xamarin samples
# Surface Duo - Xamarin SDK samples
This repo contains Xamarin and Xamarin.Forms Android samples for Surface Duo.
This repo contains Xamarin and Xamarin.Forms Android samples for Surface Duo, all accessible from a single Visual Studio solution.
## Get Started
To learn how to load your app on to emulator, and to use it, refer to the [Surface Duo docs](https://docs.microsoft.com/dual-screen) and [Xamarin.Forms dual-screen docs](https://docs.microsoft.com/xamarin/xamarin-forms/app-fundamentals/dual-screen/).
To learn how to load your app on to emulator, and to use it, refer to the [Surface Duo developer docs](https://docs.microsoft.com/dual-screen/xamarin) and [Xamarin.Forms dual-screen docs](https://docs.microsoft.com/xamarin/xamarin-forms/app-fundamentals/dual-screen/).
## Build and Test
To use the DualView and ExtendCanvas samples, you will first need to create an Google Map API key. Follow the instructions outlined [here](https://developers.google.com/maps/documentation/javascript/get-api-key) to create an API key.
### Xamarin.Forms
1. Open the **Xamarin.Duo.Samples** solution
2. Expand the **Xamarin.Forms** folder and ensure the **DualScreenDemos.Android** project is the startup project
3. Start the Surface Duo emulator - once it has started it will appear in the Visual Studio device list
4. Run the project, and you will see a menu of different examples to try:
![Menu of Xamarin.Forms dual-screen demos](Screenshots/xamarin-forms-menu.png)
The TwoPaneView playground lets you experiment with the different layout options it supports. Read the [TwoPaneView docs](https://docs.microsoft.com/dual-screen/xamarin/twopaneview) for details on how to control the layout.
![Menu of Xamarin.Forms TwoPaneView control playground](Screenshots/xamarin-forms-twopaneview.png)
### Xamarin.Android
1. Open the **Xamarin.Duo.Samples** solution
2. Expand the **Xamarin.Android native** folder
3. Choose one of the projects listed as the startup project (eg. Companion Pane, DragAndDrop, DualView, ExtendCanvas, IntentToSecondScreen, MasterDetail, TwoPage)
4. Start the Surface Duo emulator - once it has started it will appear in the Visual Studio device list
5. Run the project
6. Change the startup project to try each sample
### API keys
To use the **DualView** and **ExtendCanvas** samples, you will first need to create an Google Map API key. Follow the instructions outlined [here](https://developers.google.com/maps/documentation/javascript/get-api-key) to create an API key.
After you have an API key, put it in the following files:

Двоичные данные
Screenshots/xamarin-forms-menu.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 29 KiB

Двоичные данные
Screenshots/xamarin-forms-twopaneview.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 26 KiB