C# Класс App_Code.Controls.WidgetContainer

Themeable class for displaying WidgetBase derived controls.
WidgetContainer is meant to be the themeable parent class of any control that derives from WidgetBase. This way a theme can automatically apply some basic styling to the way widgets are displayed without having to edit each one or edit the WidgetBase class to change the rendered output. Inherited WidgetContainers must contain a control named phWidgetBody. This is the control that the WidgetContainer's child Widget is injected inside of. phWidgetBody just needs to derive from Control to work, leaving flexibility for anyone creating a theme. If phWidgetBody isn't found, an exception isn't thrown, but a warning label is applied to the page.
Наследование: System.Web.UI.UserControl
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
DoesThemeWidgetContainerExist ( bool existenceCheck ) : bool

Returns whether the theme contains a widget container file.

GetThemeWidgetContainerFilePath ( bool existenceCheck ) : string

Returns the file path of where a theme's widget container would expect to be located.

GetThemeWidgetContainerVirtualPath ( bool existenceCheck ) : string

Returns the virtual path of where a theme's widget container would expect to be located.

GetWidgetContainer ( App_Code.Controls.WidgetBase widgetControl ) : WidgetContainer

Loads the widget container (either the one located in the theme folder, or the default one if a theme widget container is missing), and adds the Widget to the widget container.

GetWidgetContainer ( App_Code.Controls.WidgetBase widgetControl, bool widgetContainerExists, string widgetContainerVirtualPath ) : WidgetContainer

Loads the widget container (either the one located in the theme folder, or the default one if a theme widget container is missing), and adds the Widget to the widget container.

ProcessLoad ( ) : void

Manually run the Initialization process.

RenderContainer ( ) : void

The container will be processed when invoked, rather than waiting for the Load event to occur.

Защищенные методы

Метод Описание
OnLoad ( EventArgs e ) : void

Raises the E:System.Web.UI.Control.Load event.

OnPreRender ( EventArgs e ) : void

Raises the E:System.Web.UI.Control.PreRender event.

Описание методов

DoesThemeWidgetContainerExist() публичный статический Метод

Returns whether the theme contains a widget container file.
public static DoesThemeWidgetContainerExist ( bool existenceCheck ) : bool
existenceCheck bool
Результат bool

GetThemeWidgetContainerFilePath() публичный статический Метод

Returns the file path of where a theme's widget container would expect to be located.
public static GetThemeWidgetContainerFilePath ( bool existenceCheck ) : string
existenceCheck bool
Результат string

GetThemeWidgetContainerVirtualPath() публичный статический Метод

Returns the virtual path of where a theme's widget container would expect to be located.
public static GetThemeWidgetContainerVirtualPath ( bool existenceCheck ) : string
existenceCheck bool /// When true, the path to the theme folder to check for the WidgetContainer existence /// is returned. When false, the path to the control that will be loaded is returned. /// If it's a Razor theme, the path will be RazorHost instead of the actual theme folder /// name. ///
Результат string

GetWidgetContainer() публичный статический Метод

Loads the widget container (either the one located in the theme folder, or the default one if a theme widget container is missing), and adds the Widget to the widget container.
public static GetWidgetContainer ( App_Code.Controls.WidgetBase widgetControl ) : WidgetContainer
widgetControl App_Code.Controls.WidgetBase
Результат WidgetContainer

GetWidgetContainer() публичный статический Метод

Loads the widget container (either the one located in the theme folder, or the default one if a theme widget container is missing), and adds the Widget to the widget container.
public static GetWidgetContainer ( App_Code.Controls.WidgetBase widgetControl, bool widgetContainerExists, string widgetContainerVirtualPath ) : WidgetContainer
widgetControl App_Code.Controls.WidgetBase
widgetContainerExists bool
widgetContainerVirtualPath string
Результат WidgetContainer

OnLoad() защищенный Метод

Raises the E:System.Web.UI.Control.Load event.
protected OnLoad ( EventArgs e ) : void
e System.EventArgs The object that contains the event data.
Результат void

OnPreRender() защищенный Метод

Raises the E:System.Web.UI.Control.PreRender event.
protected OnPreRender ( EventArgs e ) : void
e System.EventArgs An object that contains the event data.
Результат void

ProcessLoad() публичный Метод

Manually run the Initialization process.
public ProcessLoad ( ) : void
Результат void

RenderContainer() публичный Метод

The container will be processed when invoked, rather than waiting for the Load event to occur.
public RenderContainer ( ) : void
Результат void