Click or drag to resize

DashboardElementWidget Class

The class DashboardElementWidget provides base dashboard element widget
Inheritance Hierarchy

Namespace:  Dynamicweb.Dashboards.Widgets
Assembly:  Dynamicweb.Dashboards (in Dynamicweb.Dashboards.dll) Version: 2.9.4
Syntax
public abstract class DashboardElementWidget : DashboardWidget

The DashboardElementWidget type exposes the following members.

Constructors
  NameDescription
Protected methodDashboardElementWidget
Initializes a new instance of the DashboardElementWidget class
Top
Properties
  NameDescription
Public propertyColumns
Gets or sets widget size
(Inherited from DashboardWidget.)
Public propertyCreatedDate
Gets the created date and time.
(Inherited from DashboardWidget.)
Public propertyElement
The to be shown
Public propertyId
Gets widget Id
(Inherited from DashboardWidget.)
Public propertyModifiedDate
Gets the last modified date and time.
(Inherited from DashboardWidget.)
Public propertyOrder
Gets or sets widget order
(Inherited from DashboardWidget.)
Public propertyShowTitle
Gets or sets value indicating whether to show widget title.
(Inherited from DashboardWidget.)
Public propertyTitle
Gets or sets widget title
(Inherited from DashboardWidget.)
Public propertyTitleAction
Gets or sets widget title action
(Inherited from DashboardWidget.)
Top
Methods
  NameDescription
Public methodFetch
Fetches widget data from storage
(Inherited from DashboardWidget.)
Public methodGetIdSuitableString (Inherited from ConfigurableAddIn.)
Public methodGetOptions
Return dropdown options
(Inherited from DashboardWidget.)
Public methodGetParametersToXml (Inherited from ConfigurableAddIn.)
Public methodGetParametersToXml(Boolean) (Inherited from ConfigurableAddIn.)
Public methodLoadParametersFromXml (Inherited from ConfigurableAddIn.)
Public methodRender
The method render widget and return html
(Overrides DashboardWidgetRender.)
Public methodRenderAdditionalContent (Inherited from ConfigurableAddIn.)
Public methodScriptDependencies
Specifies relative paths to all script files that this widget is dependent upon.
(Inherited from DashboardWidget.)
Public methodSetValue (Inherited from ConfigurableAddIn.)
Public methodStylesheetDependencies
Specifies relative paths to all style files that this widget is dependent upon.
(Inherited from DashboardWidget.)
Public methodUpdateFromPost (Inherited from ConfigurableAddIn.)
Top
Examples
How to inherit DashboardElementWidget
using Dynamicweb.Dashboards.Widgets;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Dynamicweb.UI.Elements.Displays.Charts;
using Dynamicweb.Extensibility.AddIns;

namespace Dynamicweb.Dashboards.Examples
{
    [AddInName("Simple your site under attack")]
    [AddInDescription("Show site under attack alarm")]
    [AddInIcon(Core.UI.Icons.KnownIcon.Beer)]

    public sealed class SimpleElementWidget : DashboardElementWidget
    {
        public SimpleElementWidget()
        {
        }

        public override void Fetch(IDashboard dashboard, string path)
        {
            var infoBar = new UI.Elements.Displays.Infobar();
            infoBar.Message = "Your site under attack";
            infoBar.MessageType = UI.Elements.Displays.MessageType.Error;
            Element = infoBar;
        }
    }
}
See Also