Skip to content

Commit

Permalink
chore: update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewBabbitt97 authored Jan 16, 2023
1 parent dea53e0 commit 74e68b7
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

# Blazor Desktop
Blazor Desktop allows you to create desktop apps using Blazor. Apps run inside of a .NET generic host with a WPF window thats fully managed using a similar template to Blazor WASM.
![app](https://user-images.githubusercontent.com/2308261/153133429-7e1cdebd-72d0-4d61-91d9-eb14089cf9fc.png)
![app](https://user-images.githubusercontent.com/2308261/212734109-a405ebe1-bd39-495b-b663-b8522b88f36c.png)

# Getting Started
The easiest way to get started with Blazor Desktop is to install the templates, you can do so using the dotnet cli as follows:
Expand All @@ -25,12 +25,15 @@ dotnet new blazordesktop -n MyBlazorApp
The Blazor Desktop template is set up very similar to the Blazor WASM template, you can see the `Program.cs` file here:

```csharp
using BlazorDesktop.Hosting;
using HelloWorld;
using HelloWorld.Data;
using BlazorDesktop.Hosting;
using Microsoft.AspNetCore.Components.Web;

var builder = BlazorDesktopHostBuilder.CreateDefault(args);

builder.UseWebViewInstaller();

builder.RootComponents.Add<App>("#app");
builder.RootComponents.Add<HeadOutlet>("head::after");

Expand Down Expand Up @@ -58,7 +61,8 @@ builder.Window.UseTitle("Hello");

Window size:
```csharp
builder.Window.UseWidth(1920)
builder.Window
.UseWidth(1920)
.UseHeight(1080);
```

Expand All @@ -72,7 +76,7 @@ Disable the window frame (allows you to use your own window chrome inside of Bla
builder.Window.UseFrame(false);
```

And change your window icon (uses `wwwroot/favicon.ico` as the default):
And change your window icon (uses `favicon.ico` as the default, base directory is `wwwroot`):
```csharp
builder.Window.UseIcon("myicon.ico");
```
Expand Down

0 comments on commit 74e68b7

Please sign in to comment.