• Stars
    star
    214
  • Rank 184,678 (Top 4 %)
  • Language
    C#
  • License
    Other
  • Created over 6 years ago
  • Updated about 2 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A collection of code samples for the Uno Platform

Uno Platform Samples

This repository provides simple, to-the-point code samples for the Uno Platform.

See a complete list of code samples below. Some of the samples have accompanying step-by-step tutorials in the official Uno Platform documentation.

Pixel-Perfect. Multi-Platform. C# & Windows XAML. Today.

Twitter Followers PRs Welcome

What is the Uno Platform?

The Uno Platform is a UI Platform for building single-codebase applications for Windows, Web/WebAssembly, iOS, macOS, Android and Linux.

It allows C# and Windows XAML code to run on all target platforms, while allowing you control of every pixel. It comes with support for Fluent, Material and Cupertino design systems out of the box. Uno Platform implements a growing number of the UWP APIs, such as Windows.UI.Xaml, to enable UWP and WinUI applications to run on on all platforms with native performance.

Use the UWP/WinUI tooling from Windows in Visual Studio, such as XAML Hot Reload and C# Edit and Continue, build your application as much as possible on Windows, then validate that your application runs on iOS, Android, macOS and WebAssembly.

Visit our documentation for more details.

Samples

Commerce App

The Commerce App is a sample application that demonstrates the use of ListFeed pagination, Feedviews, and other features provided by Uno.Extensions. It illustrates how these features can be applied to create an application complete with a shopping cart, products, and more.

Browse source

Advanced XBind

The {x:Bind} markup extension�new for Windows 10�is an alternative to {Binding}. {x:Bind} runs in less time and less memory than {Binding} and supports better debugging.

Browse source

Android Custom Camera

An Android-specific sample that shows how to start a camera capture intent, and display the result in an Image control.

Browse source

Authentication with OpenID Connect (OIDC)

This sample application demonstrates the usage of the WebAuthenticationBroker in Uno with an OpenID Connect endpoint.

Browse source

Follow the tutorial

Auto-Suggest

An implementation of the XAML AutoSuggest control, showing how to autofill suggestions for user input.

Browse source

Benchmark

An implementation of the .NET Benchmark Control, a performance comparison tool.

Browse source

BluetoothExplorer

A sample that allows the user to search for nearby Bluetooth connections and connect to a device of their choice. Uses InTheHand.BluetoothLE

Browse source

Camera Capture UI

A cross-platform implementation of the UWP CameraCaptureUI class that allows the user to capture audio, video, and photos from the device camera.

Browse source

CardView Migration

An Uno conversion of the Xamarin CardView sample showing how to migrate a custom control.

Browse source

Chat SignalR

Demonstrates the use of SignalR in an Uno Platform application.

Browse source

Control Library

An example of creating a custom control library and calling a control from your shared project.

Browse source

Custom Sorting

Sample app to accompany "Adding Custom Sorting Logic" blog post.

Browse source

Dual-Screen

A simple example using the TwoPaneView control spanned across dual screens (such as Neo or Duo dual-screen devices for example).

Browse source

Entity Framework Core Demo

An example of Entity Framework Core 7 with a SQLite storage for WebAssembly, WinAppSDK, iOS and Android.

Browse source

EmbeddedResources

An example that demonstrates the use of embedded resources and how to read them from your app. Note that the Default namespace property of all projects is the same in order for the embedded resource names to be the same on all platforms.

Browse source

FileSavePicker iOS

A working implementation of a folder-based save file picker for iOS. See the 'iOS' section in the Windows.Storage.Pickers Uno documentation for more information.

Browse source

Food Delivery

Browse source

HtmlControls

This is a WASM-only sample. It is creating native HTML elements that can be used directly in XAML.

Browse source

Inserting Separators

This example demonstrates the dynamic creation of a menu incorporating nested items as well as items with separators.

Browse source

LiteDB

This is an example that utilizes the LiteDB NuGet package to save data.

Browse source

Localization Samples

A pair of samples related to localization:

Map Control

An implementation of the UWP Maps control with a custom slider that binds the value of the slider to the ZoomLevel property of the control.

Browse source

Migrating Xamarin.Forms Effects

Code samples to accompany the blog post on Migrating from Xamarin.Forms Effects

  • XamarinFormsEffect: A reference implementation of an effect with an Android implementation. Browse source
  • UnoEffectSample: Showcasing how to replace Effects with either ControlTemplates or custom code accessing the native control. Browse source

Migrating Animations

Code to accompany the blog post on migrating animations from Xamarin Forms to Uno.

Browse source

Native Frame Navigation

An example showcasing how to set up the native frame navigation for iOS and Android, and frame navigation in general for Uno.

Browse source

Follow the tutorial

Native Style Switch

An example of a toggle that allows you to switch between Native UI Controls and UWP UI Controls. The sample includes a checkbox, slider, button, and toggle.

Browse source

Neumorphism

An example of an app containing an animated lock that you can unlock.

Browse source

Package Resources

An example that demonstrates the use of package assets and how to read them from your app.

Note that for WebAssembly assets are downloaded on demand, as can be seen in the browser's network tab.

Browse source

Pet Adopt

An example that demonstrates the use of pipspager with a flipview, in an app created with the help of the Figma-to-XAML plugin.

Browse source

SQLite

This is a simple standalone app demonstrating the use of SQLite in an Uno application, including WebAssembly. It uses Erik Sink's SQLitePCLRaw, and Frank Krueger's sqlite-net libraries.

Browse source

SkiaSharp Test

An example of the Uno implementation of SkiaSharp creating a basic canvas with text.

Browse source

SkiaSharp Skottie: Lottie file player

This samples shows the use of the SkiaSharp.Skottie component, which allows the playback of lottie files.

This component provides Lottie support for all available Uno Platform targets.

Browse source

Splash Screen Sample

An example showing how to set the splash/launch screen in Uno.

Browse source

Follow the tutorial

StatusBar Theme Color

An example showing how to adjust the StatusBar and CommandBar dynamically based on the current light/dark theme.

Browse source

Follow the tutorial

The Cat Api Client

An example demonstrating an approach to consuming REST web services in Uno using HttpClient.

Browse source

Follow the tutorial

Time Entry

Code for the Silverlight migration tutorial.

Browse source

Follow the tutorial

Toy Car

A proof of concept of a car animation using the TwoPaneView control spanned across dual screens (such as Neo or Duo dual-screen devices for example). Inspiration from Justin Liu's demo app.

Browse source

Travel UI

A sample travel app that shows how a user could 1) search for locations, 2) favorite locations and 3) view their profile as well as others' profiles. For the layout, showcases many ListViews coupled with Grids.

Browse source

Uno Contoso

A port of Microsoft's Contoso Enterprise UWP app to Uno Platform, using Prism.

Browse source

Uno.Cupertino

An example showing how to set up the Uno.Cupertino library.

Browse source

Consult the documentation

Uno+Ethereum+Blockchain

A sample showing how to integrate smart contracts on the Ethereum blockchain with a multi-targeted Uno Platform application.

Browse source

Uno Good Reads

A sample showing how to make an app containing several pages in a TabView, as well as fake data generation to populate those pages.

Browse source

Uno Islands

This sample shows how you can integrate Uno Platform XAML controls into existing WPF applications using Uno Islands. This feature allows you to enhance WPF apps with Uno Platform features by hosting Uno Platform XAML files in a Shared project and adding an Uno Island using the UnoXamlHost control.

Browse source

Follow the tutorial

Uno.Material Sample

An example showing how to set up the Uno.Material library.

Browse source

Follow the tutorial

Uno.Toolkit.Material Sample

An example showing how to set up the Uno.Toolkit.Material library,

Browse source

Consult the documentation

Uno Onnx

Browse source

Uno SQlite One Drive Invoice

Browse source

WCT DataGrid

A dynamic grid view ported from the Windows Community Toolkit that allows for x:Bind.

Browse source

Follow the tutorial

WCT DataGrid, TreeView, TabView

A combined Windows Community Toolkit sample showing the DataGrid, TreeView, and TabView controls in action.

Browse source

WebRTC

Demo of the usage of WebRTC in Uno WebAssembly. This sample establishes a direct WebRTC connection between 2 browsers and uses it to send messages between peers.

Browse source

XAML Basics : ListView

Browse source

UnoBackgroundWorker: Background Work

Browse source

CountryDataSample

Browse source

UnoScrollReveal

Browse source

Visit our documentation for more details.

Contributors

Thanks go to these wonderful people (List made with contrib.rocks):

Uno.Samples Contributors

💖 Thank you.

More Repositories

1

uno

Open-source platform for building cross-platform native Mobile, Web, Desktop and Embedded apps quickly. Create rich, C#/XAML, single-codebase apps from any IDE. Hot Reload included! 90m+ NuGet Downloads!!
C#
8,817
star
2

Uno.Wasm.Bootstrap

A simple nuget package to run C# code in a WASM-compatible browser
WebAssembly
370
star
3

Uno.Playground

Source code for the Uno Gallery apps and Uno Playground (made in Wasm)
C#
214
star
4

Uno.QuickStart

An Uno "Hello world!" project using Windows UWP, Linux, iOS, Android and WebAssembly
C#
173
star
5

Uno.Themes

This library is designed to help you use the Material, Fluent or Cupertino design system with the Uno Platform
C#
168
star
6

Uno.Gallery

The Uno Platform Gallery application
C#
152
star
7

Uno.SourceGeneration

A Roslyn based C# source generation framework
C#
129
star
8

workshops

workshops, study guides and learning materials for the Uno Platform
C#
97
star
9

Uno.CodeGen

A set of source generators for equality, immutability, ...
C#
90
star
10

uno.toolkit.ui

A set of custom controls for the WinUI and the Uno Platform not offered out of the box by WinUI, such as Card, TabBar, NavigationBar, etc.
C#
82
star
11

uado

Universal Azure DevOps Organizer - Uno Reference Implementation project
C#
81
star
12

Uno.Ch9

Ch9 - Uno Reference Implementation project
C#
72
star
13

uno.extensions

Libraries to ease common developer tasks associated with building multi-platform mobile, desktop and web applications using Uno Platform or WinAppSDK.
C#
72
star
14

Uno.GettingStartedTutorial

A getting started with the Uno Platform Tutorial
C#
50
star
15

uno.todo

Uno Platform "Uno To Do" reference app
C#
47
star
16

Uno.Core

Uno.Core is a set of helpers and extension methods used to accelerate development.
C#
39
star
17

Uno.SQLitePCLRaw.Wasm

An SQLiteRaw WebAssembly provider for SQLitePCLRaw.core
C#
35
star
18

uno.check

CLI tool to setup your environment to build Uno Platform apps
C#
30
star
19

Elmish.Uno

Static UWP views for elmish programs running with the Uno Platform
F#
26
star
20

uno.fabulous

F#
22
star
21

uno.templates

Uno Platform project templates
C#
16
star
22

uno.resizetizer

The home for Uno.Resizetizer, an image resizting tooling for Uno Platform apps
C#
15
star
23

Uno.UITest

Unified UI Testing Framework for Uno Platform based applications
C#
12
star
24

RpnCalculator

The Xamarin.Forms RPN (Reverse Polish Notation) calculator running in WebAssembly
C#
11
star
25

Uno.Roslyn

A set of roslyn extensions and helpers packaged as content files to avoid extertnal dependencies in analyzers and source generators
C#
11
star
26

uno.blazor.native.todoapp

A Todo app using Uno WebAssembly Renderers for Blazor Native
C#
11
star
27

uno.fonts

Uno Platform Fonts
PowerShell
10
star
28

Uno.PackageDiff

A command line tool that compares two versions of a NuGet package and provides public API differences
C#
10
star
29

talks

conference, meetup and hackathon presentation materials for the Uno Platform
C#
10
star
30

Uno.Wasm.WebSockets

An Uno Platform implementation of .NET System.Net.WebSocket for WebAssembly
C#
10
star
31

Uno.DotnetRuntime.WebAssembly

template for brand new github repositories
PowerShell
7
star
32

uno.ui.runtimetests.engine

In-App MS Tests Runner for Uno Platform and WinAppSDK
C#
7
star
33

Uno.LottieSample

C#
7
star
34

uno.xamlmerge.task

C#
7
star
35

cybertruck

Cybertruck demo in XAML with the Uno Platform
C#
6
star
36

styleguide

style guide and brand assets for the Uno Platform
5
star
37

uno.dopesbench

C#
5
star
38

Uno.UITests.Helpers

Xamarin.UITests Helpers for the Uno Platforms for iOS and Android
C#
4
star
39

template

template for brand new github repositories
4
star
40

Uno.Diagnostics.Eventing

A set of packages and tools that enable the use of the Windows Performance Analyzer tooling with iOS, Android and WebAssembly.
C#
3
star
41

winui3-convert

A command line tool to convert UWP project libraries to WinUI 3 for .NET 5
C#
3
star
42

dotnet-azdo-artifacts-multidownload

template for brand new github repositories
C#
2
star
43

Uno.MonoAnalyzers

A set of Roslyn C# analyzers for Xamarin and Mono-based code bases
C#
2
star
44

Uno.MSAL.Graph.Demo

Uno Demo app for using MS Graph API with Uno version of MSAL
C#
2
star
45

performance

This repo contains benchmarks used for testing the performance of the Uno Platform
C#
2
star
46

Uno.UI.Toolkit.SL

The Silverlight Toolkit ported to the Uno Platform
C#
2
star
47

uno.extensions.logging

Set of loggers compatible with Microsoft.Extensions.Logging. Provides an OSLog logger, and a browser console WebAssembly logger
C#
2
star
48

Uno.Microsoft.Identity.Client

Fork of https://github.com/AzureAD/microsoft-authentication-library-for-dotnet to add support for Uno-WASM
C#
1
star
49

docker

template for brand new github repositories
Dockerfile
1
star