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.
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
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
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
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.
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
Environment START RUN END 3* Run the tool from the command prompt with the following command: 4* Follow the instructions indicated by the tool 2* If the above command fails, use the following: uno-check ~/.dotnet/tools/uno-check
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
App Canvas START RUN END 2* Open Visual Studio Code to see the generated codebase or run the following code from the Terminal: 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.
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
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.
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
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