Class IFrameComponentAttribute
Defines a component that will load a page inside an iframe with a defined source location.
Implements
Inherited Members
Namespace: EPiServer.Shell.ViewComposition
Assembly: EPiServer.Shell.dll
Version: 10.10.4Syntax
[AttributeUsage(AttributeTargets.Class)]
public class IFrameComponentAttribute : ComponentAttribute, _Attribute
Constructors
IFrameComponentAttribute()
Initializes a new instance of the IFrameComponentAttribute class.
Declaration
public IFrameComponentAttribute()
Properties
ControlUri
If a wrapper is used to encapsulate a UserControl, this property can be set to access its URI used when loading the control. The default value is null.
Declaration
protected virtual string ControlUri { get; set; }
Property Value
Type | Description |
---|---|
System.String | The URI to the ascx of the control. |
KeepUrlOnContextChange
Gets or sets if the iFrame should keep the current url when the context is changed and the iFrame is reloaded. The default value is false.
Declaration
public bool KeepUrlOnContextChange { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | If the iFrame should keep the url when context is changed. |
MaxHeight
The maximum height of the iFrame. This is set as a stylesheet attribute. The default value is 500.
Declaration
public int MaxHeight { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 | The maximum height of the iFrame. |
MinHeight
The minimum height of the iFrame. This is set as a stylesheet attribute. The default value is 100.
Declaration
public int MinHeight { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 | The minimum height of the iFrame. |
ReloadOnContextChange
Gets or sets if the iFrame should be reloaded when the context is changed. The default value is true.
Declaration
public bool ReloadOnContextChange { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | If the iFrame should be reloaded when the context is changed. |
Url
Gets or sets the source URL for the iframe to load.
Declaration
public virtual string Url { get; set; }
Property Value
Type | Description |
---|---|
System.String | The source URL. |
WidgetType
Gets the type of Widget that is used for the IFrameComponent
Declaration
public override string WidgetType { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Overrides
Methods
CreateComponentDefinition(Type)
Creates the component definition from the settings provided in the attribute properties.
Declaration
public override IComponentDefinition CreateComponentDefinition(Type attributedType)
Parameters
Type | Name | Description |
---|---|---|
System.Type | attributedType |
Returns
Type | Description |
---|---|
IComponentDefinition | A new instance of a EPiServer.Shell.ViewComposition.DefaultComponentDefinition. |