Class Frame

Read and edit frame information

Inheritance
System.Object
Frame
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: EPiServer.DataAbstraction
Assembly: EPiServer.dll
Version: 11.20.7
Syntax
public class Frame
Remarks

EPiServer has at least 2 system frames, "_blank" and "_top". More frames can be added using the administration mode and then selected by the editor.

Examples

Example that demonstrates listing all available frames

            FrameCollection frames = Frame.List();
foreach (Frame frame in frames)
    Response.Write("Frame=" + frame.Name);
        Example that creates a new frame
                Frame frame = new Frame();
    frame.Name = "MyFrame";
    frame.Description = "Frame for special window";
    frame.Save();

Constructors

Frame()

Initializes a new instance of the Frame class.

Declaration
public Frame()

Frame(Int32, String, String, Boolean)

Initializes a new instance of the Frame class.

Declaration
public Frame(int frameID, string frameName, string frameDescription, bool systemFrame)
Parameters
Type Name Description
System.Int32 frameID

The ID of the Frame.

System.String frameName

The name of the Frame.

System.String frameDescription

A description of the Frame.

System.Boolean systemFrame

true if the frame is a system frame; otherwise, false.

Frame(String, String)

Initializes a new instance of the Frame class.

Declaration
public Frame(string frameName, string frameDescription)
Parameters
Type Name Description
System.String frameName

The name of the Frame.

System.String frameDescription

A description of the Frame.

Properties

Description

The display description for the frame

Declaration
public string Description { get; set; }
Property Value
Type Description
System.String

ID

The frame unique identifier

Declaration
public int ID { get; set; }
Property Value
Type Description
System.Int32

IsSystemFrame

If this is a non-deletable system frame

Declaration
public bool IsSystemFrame { get; set; }
Property Value
Type Description
System.Boolean

LocalizationService

Declaration
public LocalizationService LocalizationService { get; set; }
Property Value
Type Description
LocalizationService

LocalizedDescription

The localized display description for the frame

Declaration
public string LocalizedDescription { get; }
Property Value
Type Description
System.String

Name

Actual frame name, for example "_blank"

Declaration
public string Name { get; set; }
Property Value
Type Description
System.String

Methods

Delete()

Deletes the current frame

Declaration
[Obsolete("Use IFrameRepository instead")]
public void Delete()

Equals(Object)

Determines whether this instance of Frame and a specified object, which must also be a Frame object, have the same value.

Declaration
public override bool Equals(object obj)
Parameters
Type Name Description
System.Object obj

An object.

Returns
Type Description
System.Boolean

true if obj is a Frame and its value is the same as this instance; otherwise, false.

Overrides
System.Object.Equals(System.Object)

GetHashCode()

Returns the hash code for this frame.

Declaration
public override int GetHashCode()
Returns
Type Description
System.Int32

A 32-bit signed integer hash code.

Overrides
System.Object.GetHashCode()

List()

Retrieves a frame list

Declaration
[Obsolete("Use IFrameRepository instead")]
public static FrameCollection List()
Returns
Type Description
FrameCollection

Load(Int32)

Load a frame by id

Declaration
[Obsolete("Use IFrameRepository instead")]
public static Frame Load(int id)
Parameters
Type Name Description
System.Int32 id

The id of the frame

Returns
Type Description
Frame

Load(String)

Load a frame by name

Declaration
[Obsolete("Use IFrameRepository instead")]
public static Frame Load(string name)
Parameters
Type Name Description
System.String name

The name of the frame

Returns
Type Description
Frame

Save()

Saves frame information or creates a new frame

Declaration
[Obsolete("Use IFrameRepository instead")]
public void Save()

Operators

Equality(Frame, Frame)

Determines whether two specified Frame objects have the same value.

Declaration
public static bool operator ==(Frame x, Frame y)
Parameters
Type Name Description
Frame x

A Frame or a null reference.

Frame y

A Frame or a null reference.

Returns
Type Description
System.Boolean

true if the value of x is the same as the value of y; otherwise, false.

Inequality(Frame, Frame)

Determines whether two specified Frame objects have different values.

Declaration
public static bool operator !=(Frame x, Frame y)
Parameters
Type Name Description
Frame x

A Frame or a null reference.

Frame y

A Frame or a null reference.

Returns
Type Description
System.Boolean

true if the value of x is different from the value of y; otherwise, false.

Extension Methods