Slide 1

Slide 1 text

February 24, 2023 Aba Microsoft User Hangout Uno Hello Linux Running Uno Platform App on Linux for the first time.

Slide 2

Slide 2 text

Quite simply Uno Platform is the only choice if you want cross platform, high quality applications written in C#. James Hancock Aba Microsoft User Hangout February 24, 2023

Slide 3

Slide 3 text

Intro Presenter @cyromaven Name: David Onoh Job: Software Developer | Educator Tag: Supporting the .NET ecosystem through Meetups and shared resources. Time: 30 minutes

Slide 4

Slide 4 text

Today's Agenda 1 Session Introduction 2 Prerequisites 3 Environment and App Canvas 4 Modify Template and Run Aba Microsoft User Hangout February 24, 2023

Slide 5

Slide 5 text

Introduction Build Pixel Perfect Cross-Platform Apps From Linux with .NET and VS Code The goal of this session to introduce Linux fans to a one- stop solution for building custom Linux tools with. NET. Ship to the Web as well from the same codebase — with some help from VS Code. February 24, 2023 Aba Microsoft User Hangout

Slide 6

Slide 6 text

February 24, 2023 Aba Microsoft User Hangout Let's Begin! Are you ready?

Slide 7

Slide 7 text

Prerequisites START RUN END Visual Studio Code The Uno Platform Visual Studio Code Extension .NET SDK .NET 7.0 SDK (version 7.0 (SDK 7.0.102) or later) Optionally, you might need the Gtk+3 runtime, as well Use dotnet --version from the terminal to get the version installed.

Slide 8

Slide 8 text

Environment 1* Open a Terminal START RUN END 2* b* To update the tool, if you already have a legacy one: 2* a* Install the tool by running the following command from the command prompt: dotnet tool install -g uno.check dotnet tool update -g uno.check

Slide 9

Slide 9 text

Environment START RUN END 3* Run the tool from the command prompt with the following command: 4* Follow the instructions indicated by the tool If the above command fails, use the following: uno-check ~/.dotnet/tools/uno-check

Slide 10

Slide 10 text

App Canvas 1* In the terminal, type the following to create a new project: START RUN END This will create the Canvas that includes support for only the WebAssembly and Skia+GTK platforms dotnet new unoapp -o UnoHelloLinux -mobile=false --skia- wpf=false --skia-linux-fb=false --vscode

Slide 11

Slide 11 text

App Canvas START RUN END the following code from the Terminal: 2* Open Visual Studio Code to see the generated codebase or run 4* Once the project has been loaded, in the status bar at the bottom left of VS Code, UnoHelloLinux.sln is selected by default. Select UnoHelloLinux.Skia.Gtk.csproj instead. code ./UnoHelloLinux 3* Visual Studio Code will ask to restore the NuGet packages.

Slide 12

Slide 12 text

Modify Template START RUN END Replace the Grid's content with the following lines of code. This will add a StackPanel, a TextBlock, a Slider, and a Binder to give a dynamic result on the first try. Your new Grid layout should look like this: In your UnoHelloLinux Class Library project, open up MainPage.xaml

Slide 13

Slide 13 text

Run START RUN END On Linux In the debugger section of the Code activity bar, select Skia.GTK (Debug) Press F5 to start the debugging session Place a breakpoint inside the OnClick method Click the button in the app, and the breakpoint will hit 1. 2. 3. 4. On WebAssembly In the debugger section of the Code activity bar, select Debug (Chrome, WebAssembly) Press F5 to start the debugging session Place a breakpoint inside the OnClick method Click the button in the app, and the breakpoint will hit 1. 2. 3. 4.

Slide 14

Slide 14 text

Preview You can finally see a screenshot of the code run here. For more information you can follow up on next steps at: https://platform.uno/docs/articles/getting-started- tutorial-2.html February 24, 2023 Aba Microsoft User Hangout

Slide 15

Slide 15 text

February 24, 2023 Aba Microsoft User Hangout With the Uno Platform, I can expose powerful, flexible user experiences on every single platform my users need. Billy Hollis

Slide 16

Slide 16 text

February 24, 2023 Aba Microsoft User Hangout Thank you! Have a great day ahead.