-
Notifications
You must be signed in to change notification settings - Fork 1
Common Library
Antoine Théate edited this page Apr 21, 2023
·
9 revisions
Include a reference to the css, with the following lines
<link href="_content/CDP4.WEB.Common/css/styles.css" rel="stylesheet" />
<link href="_content/DevExpress.Blazor.Themes/bootstrap-external.bs5.min.css" rel="stylesheet" />
To use common pages/components, add those using directive
@using DevExpress.Blazor
@using COMET.Web.Common.Components
@using COMET.Web.Common.Components.ParameterTypeEditors
@using COMET.Web.Common.Components.Selectors
@using COMET.Web.Common.Components.ValueSetRenderers
@using COMET.Web.Common.Pages
To register all services and ViewModels requires to use the Common library, use the WebAssemblyHostBuilder extension method AddCometWebCommon. You can register your assembly, additional top menu entries and applications by filling data inside this method.
builder.AddCometWebCommon(options =>
{
options.Applications = Applications.ExistingApplications;
options.AdditionalAssemblies.Add(Assembly.GetAssembly(typeof(Program)));
options.AdditionalMenuEntries.AddRange(new List<Type>{typeof(ShowHideDeprecatedThings), typeof(AboutMenu)});
});
The Index and Logout page already exists and should not be implemented again
If any changes have to be made during the development of the CometWebApp, reference the COMET.WEB.Common project instead of using the Nuget Package, by including following lines in the COMETwebapp.csproj file
<ItemGroup>
<ProjectReference Include="..\COMET.Web.Common\COMET.Web.Common.csproj" />
</ItemGroup>
copyright @ Starion Group S.A.