Dictionary used to pass actions (function) from the Component (or a Page) who create the Overlay to the Component within the Overlay himself.
The Action Dictionary will be accessible by the Overlay Content (ModalSample:Overlayable) through Overlayable inheritance.
Property containing all 'animation' properties for this configuration.
Type | Default Value |
---|---|
NVOverlayAnimation | new NVOverlayAnimation() |
private void InitializeConfirm()
{
NVOverlayServiceConfig overlayConfig = new NVOverlayServiceConfig(NVOverlayServiceConfig.MODAL, "confirm-test", typeof(ConfirmSample),new { MaxWidth = "500px" });
overlayConfig.Animation.Name = NVOverlayServiceConfig.CONFIRM;
OverlayService.Initialize(overlayConfig);
}
Unique key used by the OverlayService to identify the Overlay to display.
This name is also used by the overlay component for the 'data-name' dom attributes.
Property containing all properties 'overlay' for this configuration.
Type | Default Value |
---|---|
NVOverlayProps | new NVOverlayProps() |
private void InitializeConfirm()
{
NVOverlayServiceConfig overlayConfig = new NVOverlayServiceConfig(NVNVOverlayServiceConfig.MODAL, "modal-sample", typeof(ModalSample), new { MaxWidth = "90vw" });
overlayConfig.AddAction("OnSave", OnSaveModal);
OverlayService.Initialize(overlayConfig);
}
Will add at key actionName an action in the Actions Dictionary.
Parameter Name | Type |
---|---|
actionName | string |
action | Action<object> |
void
private void InitializeModal()
{
NSOverlayServiceConfig overlayConfig = new NSOverlayServiceConfig(
NVOverlayServiceConfig.MODAL,
"modal",
typeof(ModalSample),
new {MaxWidth = "90vw"}
);
overlayConfig.AddAction("OnSave", OnSaveModal);
OverlayService.Initialize(oc);
}
void OnSaveModal(object data) {
// do something with data
}