Class ThemeBase
public abstract class ThemeBase : ComponentBase, IThemeControl
- Inheritance
-
objectComponentBaseThemeBase
- Implements
- Derived
Properties
JSRuntime
[Inject]
protected IJSRuntime JSRuntime { get; set; }
Property Value
- IJSRuntime
LoggingService
[Inject]
protected ILogService LoggingService { get; set; }
Property Value
Name
Friendly name for a theme
public virtual string Name { get; set; }
Property Value
- string
PageState
[CascadingParameter]
protected PageState PageState { get; set; }
Property Value
Panes
Comma delimited list of all panes in a theme
public virtual string Panes { get; set; }
Property Value
- string
Resources
Identifies all resources in a theme
public virtual List<Resource> Resources { get; set; }
Property Value
- List<Resource>
SiteState
[Inject]
protected SiteState SiteState { get; set; }
Property Value
Thumbnail
Screen shot of a theme - assumed to be in the ThemePath() folder
public virtual string Thumbnail { get; set; }
Property Value
- string
Methods
AddHeadContent(string)
public void AddHeadContent(string content)
Parameters
content
string
AddScript(Resource)
public void AddScript(Resource resource)
Parameters
resource
Resource
ContentUrl(int)
[Obsolete("ContentUrl(int fileId) is deprecated. Use FileUrl(int fileId) instead.", false)]
public string ContentUrl(int fileid)
Parameters
fileid
int
Returns
- string
ContentUrl(int, bool)
[Obsolete("ContentUrl(int fileId, bool asAttachment) is deprecated. Use FileUrl(int fileId, bool download) instead.", false)]
public string ContentUrl(int fileid, bool asAttachment)
Parameters
fileid
intasAttachment
bool
Returns
- string
EditUrl(int, string)
public string EditUrl(int moduleid, string action)
Parameters
moduleid
intaction
string
Returns
- string
EditUrl(int, string, Dictionary<string, string>)
public string EditUrl(int moduleid, string action, Dictionary<string, string> querystring)
Parameters
moduleid
intaction
stringquerystring
Dictionary<string, string>
Returns
- string
EditUrl(int, string, string)
public string EditUrl(int moduleid, string action, string querystring)
Parameters
moduleid
intaction
stringquerystring
string
Returns
- string
EditUrl(string, int, string, Dictionary<string, string>)
public string EditUrl(string path, int moduleid, string action, Dictionary<string, string> querystring)
Parameters
path
stringmoduleid
intaction
stringquerystring
Dictionary<string, string>
Returns
- string
EditUrl(string, int, string, string)
public string EditUrl(string path, int moduleid, string action, string querystring)
Parameters
path
stringmoduleid
intaction
stringquerystring
string
Returns
- string
FileUrl(int)
public string FileUrl(int fileid)
Parameters
fileid
int
Returns
- string
FileUrl(int, bool)
public string FileUrl(int fileid, bool download)
Parameters
fileid
intdownload
bool
Returns
- string
FileUrl(string, string)
public string FileUrl(string folderpath, string filename)
Parameters
folderpath
stringfilename
string
Returns
- string
FileUrl(string, string, bool)
public string FileUrl(string folderpath, string filename, bool download)
Parameters
folderpath
stringfilename
stringdownload
bool
Returns
- string
ImageUrl(int, int, int)
public string ImageUrl(int fileid, int width, int height)
Parameters
fileid
intwidth
intheight
int
Returns
- string
ImageUrl(int, int, int, string)
public string ImageUrl(int fileid, int width, int height, string mode)
Parameters
fileid
intwidth
intheight
intmode
string
Returns
- string
ImageUrl(int, int, int, string, string, string, int, bool)
public string ImageUrl(int fileid, int width, int height, string mode, string position, string background, int rotate, bool recreate)
Parameters
fileid
intwidth
intheight
intmode
stringposition
stringbackground
stringrotate
intrecreate
bool
Returns
- string
Log(Alias, LogLevel, LogFunction, Exception, string, params object[])
public Task Log(Alias alias, LogLevel level, LogFunction function, Exception exception, string message, params object[] args)
Parameters
alias
Aliaslevel
LogLevelfunction
LogFunctionexception
Exceptionmessage
stringargs
object[]
Returns
- Task
Log(Alias, LogLevel, string, Exception, string, params object[])
public Task Log(Alias alias, LogLevel level, string function, Exception exception, string message, params object[] args)
Parameters
Returns
- Task
NavigateUrl()
public string NavigateUrl()
Returns
- string
NavigateUrl(bool)
public string NavigateUrl(bool refresh)
Parameters
refresh
bool
Returns
- string
NavigateUrl(int, string)
public string NavigateUrl(int moduleid, string action)
Parameters
moduleid
intaction
string
Returns
- string
NavigateUrl(int, string, Dictionary<string, string>)
public string NavigateUrl(int moduleid, string action, Dictionary<string, string> querystring)
Parameters
moduleid
intaction
stringquerystring
Dictionary<string, string>
Returns
- string
NavigateUrl(int, string, string)
public string NavigateUrl(int moduleid, string action, string querystring)
Parameters
moduleid
intaction
stringquerystring
string
Returns
- string
NavigateUrl(string)
public string NavigateUrl(string path)
Parameters
path
string
Returns
- string
NavigateUrl(string, bool)
public string NavigateUrl(string path, bool refresh)
Parameters
path
stringrefresh
bool
Returns
- string
NavigateUrl(string, Dictionary<string, string>)
public string NavigateUrl(string path, Dictionary<string, string> querystring)
Parameters
path
stringquerystring
Dictionary<string, string>
Returns
- string
NavigateUrl(string, int, string)
public string NavigateUrl(string path, int moduleId, string action)
Parameters
path
stringmoduleId
intaction
string
Returns
- string
NavigateUrl(string, int, string, Dictionary<string, string>)
public string NavigateUrl(string path, int moduleid, string action, Dictionary<string, string> querystring)
Parameters
path
stringmoduleid
intaction
stringquerystring
Dictionary<string, string>
Returns
- string
NavigateUrl(string, int, string, string)
public string NavigateUrl(string path, int moduleid, string action, string querystring)
Parameters
path
stringmoduleid
intaction
stringquerystring
string
Returns
- string
NavigateUrl(string, string)
public string NavigateUrl(string path, string querystring)
Parameters
path
stringquerystring
string
Returns
- string
OnAfterRenderAsync(bool)
Method invoked after each time the component has been rendered interactively and the UI has finished updating (for example, after elements have been added to the browser DOM). Any Microsoft.AspNetCore.Components.ElementReference fields will be populated by the time this runs.
This method is not invoked during prerendering or server-side rendering, because those processes are not attached to any live browser DOM and are already complete before the DOM is updated.
Note that the component does not automatically re-render after the completion of any returned System.Threading.Tasks.Task, because that would cause an infinite render loop.
protected override Task OnAfterRenderAsync(bool firstRender)
Parameters
firstRender
boolSet to
true
if this is the first time Microsoft.AspNetCore.Components.ComponentBase.OnAfterRender(bool) has been invoked on this component instance; otherwisefalse
.
Returns
- Task
A System.Threading.Tasks.Task representing any asynchronous operation.
Remarks
The Microsoft.AspNetCore.Components.ComponentBase.OnAfterRender(bool) and Microsoft.AspNetCore.Components.ComponentBase.OnAfterRenderAsync(bool) lifecycle methods
are useful for performing interop, or interacting with values received from @ref
.
Use the firstRender
parameter to ensure that initialization work is only performed
once.
ScrollToPageTop()
public Task ScrollToPageTop()
Returns
- Task
SetPageTitle(string)
public void SetPageTitle(string title)
Parameters
title
string
ThemePath()
public string ThemePath()
Returns
- string