Search⌘ K

Adding a Component to the Razor Class Library

Learn how to transfer a modal dialog component into a Razor class library to enable reuse across projects. Understand renaming conventions to avoid conflicts and test the component functionality after integration.

We'll cover the following...

In order to share the Dialog component, we need to move it to the Razor class library that we just created and tested. We do this as follows:

  1. Right-click the ModalDialog\Shared\Dialog.razor file and select the “Copy” option from the menu.

  2. Right-click the MyComponents project and select the “Paste” option ...