Browse Source

Add namespaces to blazor toolbars documentation

pull/16099/head
Enis Necipoglu 4 years ago
parent
commit
957ad2e6c4
  1. 12
      docs/en/UI/Blazor/Toolbars.md

12
docs/en/UI/Blazor/Toolbars.md

@ -40,6 +40,10 @@ This sample simply shows a message. In real life, you probably want to call an H
Now, we can create a class implementing the `IToolbarContributor` interface: Now, we can create a class implementing the `IToolbarContributor` interface:
````csharp ````csharp
using Volo.Abp.AspNetCore.Components.Web.Theming.Toolbars;
// ...
public class MyToolbarContributor : IToolbarContributor public class MyToolbarContributor : IToolbarContributor
{ {
public Task ConfigureToolbarAsync(IToolbarConfigurationContext context) public Task ConfigureToolbarAsync(IToolbarConfigurationContext context)
@ -58,12 +62,16 @@ This class adds the `NotificationViewComponent` as the first item in the `Main`
Finally, you need to add this contributor to the `AbpToolbarOptions`, in the `ConfigureServices` of your [module](../../Module-Development-Basics.md): Finally, you need to add this contributor to the `AbpToolbarOptions`, in the `ConfigureServices` of your [module](../../Module-Development-Basics.md):
````csharp ```csharp
using Volo.Abp.AspNetCore.Components.Web.Theming.Toolbars;
```
```csharp
Configure<AbpToolbarOptions>(options => Configure<AbpToolbarOptions>(options =>
{ {
options.Contributors.Add(new MyToolbarContributor()); options.Contributors.Add(new MyToolbarContributor());
}); });
```` ```
That's all, you will see the notification icon on the toolbar when you run the application: That's all, you will see the notification icon on the toolbar when you run the application:

Loading…
Cancel
Save