Experimental Mobile Blazor Bindings - Build native and hybrid mobile apps with Blazor
Перейти к файлу
Oleksandr Liakhevych a14bbc46d7 Create service scopes for navigated pages 2022-04-29 00:47:50 +03:00
.vscode Update readme 2020-01-10 14:17:40 -08:00
CI Remove unneeded projects from CI.Windows.proj 2022-01-09 22:56:39 +02:00
azure-pipelines Attempt to use VS2022 build pool 2021-10-27 01:38:26 +03:00
samples Update to RC1 2022-04-12 22:19:10 +03:00
src Create service scopes for navigated pages 2022-04-29 00:47:50 +03:00
templates Update to RC1 2022-04-12 22:19:10 +03:00
tools Add Library.Template tools 2019-09-24 11:20:43 -07:00
.editorconfig Add missing license headers. 2022-01-24 12:29:43 +02:00
.gitattributes Add initial code from Steve 2019-08-02 16:49:21 -07:00
.gitignore Implementation of Authentication for OIDC and MSAL. (#215) 2020-12-22 14:31:14 -08:00
CODE_OF_CONDUCT.md Update CODE_OF_CONDUCT.md 2021-02-08 09:28:45 -08:00
CONTRIBUTING.md Update CONTRIBUTING.md 2021-02-16 11:00:59 -08:00
Directory.Build.props Nuget updates. Fixes #244. (#247) 2020-12-01 14:43:36 -08:00
LICENSE Add Azure pipelines YML 2019-09-24 10:49:11 -07:00
MobileBlazorBindings.sln Add missing license headers. 2022-01-24 12:29:43 +02:00
MobileBlazorBindings.sln.licenseheader Add license headers 2019-12-10 16:17:49 -08:00
Readme.md Update Readme.md 2021-02-25 15:49:21 -08:00
THIRD-PARTY-NOTICES.txt Update third party notices and packages 2020-07-15 11:32:55 -07:00
azure-pipelines.yml Remove 'master' branch from build stuff 2021-03-16 11:17:14 -07:00
clean.cmd Add cleanup script for local dev 2020-07-14 13:42:13 -07:00
global.json Update MobileBlazorBindings to use MAUI 2021-09-18 21:32:34 +03:00
init.cmd Add Azure pipelines YML 2019-09-24 10:49:11 -07:00
init.ps1 Change dotnet restore path 2019-09-24 11:26:41 -07:00
nuget.config Update to latest NuGet packages 2019-09-04 16:54:49 -07:00
pack.cmd Update pack.cmd to restore and pack templates 2020-07-15 11:31:22 -07:00
version.json Remove 'master' branch from build stuff 2021-03-16 11:17:14 -07:00

Readme.md

Experimental Mobile Blazor Bindings

Getting Started

Check out the documentation for how to build your first app: https://docs.microsoft.com/mobile-blazor-bindings

What is it?

Mobile Blazor Bindings enable developers to build native and hybrid mobile apps using C# and .NET for Android, iOS, Windows, macOS, and Tizen using familiar web programming patterns. This means you can use the Blazor programming model and Razor syntax to define UI components and behaviors of an application. The UI components that are included are based on Xamarin.Forms native UI controls, which results in beautiful native mobile apps. In hybrid apps you can embed Blazor web UI built with HTML directly in the app in any composition, all running in the same app process. No web servers.

Here is a sampleCountercomponent that renders native UI, which may look familiar to Blazor developers, that increments a value on each button press:

<StackLayout>
    <Label FontSize="30">You pressed @count times </Label>
    <Button Text="+1" OnClick="@HandleClick" />
</StackLayout>

@code {
    int count;

    void HandleClick()
    {
        count++;
    }
}

Notice that the Blazor model is present with code sitting side by side the user interface markup that leverages Razor syntax with mobile specific components. This will feel very natural for any web developer that has ever used Razor syntax in the past. Now with the Experimental Mobile Blazor Bindings you can leverage your existing web skills and knowledge to build native and hybrid mobile apps using C# and .NET for Android, iOS, Windows, macOS, and Tizen.

Here is the code above running in the Android Emulator:

Clicking increment button in Android emulator

More info on Mobile Blazor Bindings

To get started, all you need is the.NET Core 3.1 SDK, Visual Studio or Visual Studio for Mac, and the ASP.NET and web development and Mobile development with .NET (Xamarin.Forms) workloads installed.

Get started by reading the Getting Started section in the docs and read through the related walkthroughs.

Contributing

As an experimental project, there are several active areas of development and we're looking for your feedback to help set the direction for this project. Please check it out and let us know any feedback you have on the project by logging issues in this repo.

Code of Conduct

This project has adopted the code of conduct defined by the Contributor Covenant to clarify expected behavior in our community.

For more information, see the .NET Foundation Code of Conduct.

Thank you!