unoplatform / Uno.QuickStart

An Uno "Hello world!" project using Windows UWP, Linux, iOS, Android and WebAssembly
http://platform.uno/
Other
173 stars 26 forks source link
cross-platform csharp uwp wasm xamarin

Uno Quick Start

This repository is a basic sample for an Uno Platform application which cross-targets UWP, iOS, Android, Linux and WebAssembly.

You can clone this repository and open it in:

You can try out the WebAssembly Playground in your browser.

You can try developing this application right in your browser:

Open QuickStart in Gitpod

To create your own application, follow our getting start guides.

Develop on your machine

See the VS Code Getting started documentation for additional details about developing with Visual Studio on Windows.

Develop using Codespaces

WebAssembly

  1. Install the suggested Uno Platform extension
  2. Once the C# environment is setup, with the commmand palette use the command "Omnisharp: Select project" (or click on the project name in the status bar)
  3. Select the MyApp.Wasm project
  4. Using a terminal, navigate to the MyApp.Wasm folder
  5. Type dotnet run
  6. Once the compilation is done, a server will open on port 5000
  7. In the Ports tab (next to the Terminal tab), right click to make both the port 5000 and the other dotnet opened port (with uno.ui.remotecontrol in the running process column) to "public".

    Failure to make both ports public will prevent the app from starting properly.

  8. Codespaces will suggest to open a new browser window or as a preview window

See the section for examples below of changes to the application.

See the VS Code Getting started documentation for additional details about developing with VS Code.

Develop using Gitpod

How to develop for WebAssembly

  1. Install the suggested Uno Platform extension
  2. Once the C# environment is setup, with the commmand palette use the command "Omnisharp: Select project" (or click on the project name in the status bar)
  3. Select the MyApp.Wasm project
  4. Using a terminal, navigate to the MyApp.Wasm folder
  5. Type dotnet run
  6. Once the compilation is done, a server will open on port 5000
  7. In the Ports activity (on the left), click to padlock on both the port 5000 and the other dotnet opened port (with a number over 30000) to make ports public.

    Failure to make both ports public will prevent the app from starting properly.

  8. Gitpod will suggest to open a new browser window or as a preview window

See the section for examples below of changes to the application.

See the VS Code Getting started documentation for additional details about developing with VS Code.

How to develop for Linux (Skia.Gtk)

  1. As Gitpod will suggest, open the port 6080 as a browser preview to get access to the X11 environment.
  2. Once the C# environment is setup, with the commmand palette use the command "Omnisharp: Select project" (or click on the project name in the status bar)
  3. Select the MyApp.Skia.Gtk project
  4. To run your application, either:
    • Using a terminal, navigate to the MyApp.Skia.Gtk folder and type dotnet run
    • In the debug activity section on the left, select Skia.GTK (Debug) in drop down, the press F5 or Ctrl+F5 to start the application without the debugger.
  5. Gitpod will suggest to open a new browser window or as a preview window

See the section for examples below of changes to the application.

See the VS Code Getting started documentation for additional details about developing with VS Code.

Making additional modifications