Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing typo on the readme.md #870

Merged
merged 3 commits into from
Oct 19, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 6 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ To make it easier to start a project that uses the Fluent UI Blazor components o
[Microsoft.Fast.Templates.FluentUI](https://www.nuget.org/packages/Microsoft.Fast.Templates.FluentUI/) template package.

The package contains templates for creating Blazor Server and/or Blazor WebAssembly apps that mimic the regular Blazor
templates. The library is already set up (and all the Bootstrap styling removed). All components fromthe regular template have been
templates. The library is already set up (and all the Bootstrap styling removed). All components from the regular template have been
replaced with Fluent UI Blazor counterparts (and a few extra have been added). Please see the [documentation page](https://www.fluentui-blazor.net/Templates)
for more information.

Expand Down Expand Up @@ -125,7 +125,7 @@ maintaining accessibility. This is accomplished through setting various "design
## Blazor Hybrid
You can use this library in Blazor Hybrid (MAUI/WPF/Windows Forms) projects. Setup is almost the same as described in the "Getting started" section above, but to get everything to work you'll need to take some extra steps (for now):

1. You need to make some changes in your `{Type}Program.cs` file
1. You need to make some changes in your `{Type}Program.cs` file.
Make sure the following is added before the `return builder.Build()` line:
```csharp
builder.Services.AddFluentUIComponents(options =>
Expand All @@ -134,11 +134,9 @@ builder.Services.AddFluentUIComponents(options =>
});
```

### Tempory workaround for MAUI/WPF/Windows Forms issues
### Temporary workaround for MAUI/WPF/Windows Forms issues
Currently when using the WebView to run Blazor (so all Hybrid variants) the web-components script is not imported automatically (see [#404](https://github.com/microsoft/fluentui-blazor/issues/404).
There is also an isue with loading the custom event handlers that are being configured by the web-components script. Until these are fixed on the WebView side, there is
a workaround available, namely to intercept '_framework/blazor.modules.json' and provide proper JS initializers file (created by build). The needed `initializersLoader.webview.js` has
been added to the library and needs to be included with a script tag **before** the `_framework/blazor.webview.js` script tag:
There is also an issue with loading the custom event handlers that are being configured by the web-components script. Until these are fixed on the WebView side, there is a workaround available, namely to intercept `'_framework/blazor.modules.json'` and provide proper JS initializers file (created by build). The needed `initializersLoader.webview.js` has been added to the library and needs to be included with a script tag **before** the `_framework/blazor.webview.js` script tag:

```xml
<script app-name="{NAME OF YOUR APP}" src="./_content/Microsoft.Fast.Components.FluentUI/js/initializersLoader.webview.js"></script>
Expand All @@ -151,8 +149,7 @@ initializersLoader replaces standard `fetch` function with one which provides th
For more information regarding the bug, see issue [15234](https://github.com/dotnet/maui/issues/15234) in the MAUI repo.

## Use the DataGrid component with EF Core
If you want to use the `<FluentDataGrid>` with data provided through EF Core, you need to install
an additional package so the grid knows how to resolve queries asynchronously for efficiency. .
If you want to use the `<FluentDataGrid>` with data provided through EF Core, you need to install an additional package so the grid knows how to resolve queries asynchronously for efficiency. .

### Installation
Install the package by running the command:
Expand All @@ -161,7 +158,7 @@ dotnet add package Microsoft.Fast.Components.FluentUI.DataGrid.EntityFrameworkAd
```

### Usage
In your Program.cs file you need to add the following after the `builder.Services.AddFluentUIComponents(...);` lines:
In your `Program.cs` file, you need to add the following after the `builder.Services.AddFluentUIComponents(...);` lines:
```csharp
builder.Services.AddDataGridEntityFrameworkAdapter();
```
Expand Down