Interface ICanvasControl
- Namespace
- PnP.Core.Model.SharePoint
- Assembly
- PnP.Core.dll
Base interface for a canvas control
public interface ICanvasControl
Properties
CanvasControlData
Value of the control's "data-sp-canvascontrol" attribute
string CanvasControlData { get; }
Property Value
CanvasDataVersion
The internal canvas storage version used
string CanvasDataVersion { get; }
Property Value
Column
The ICanvasColumn hosting this control
ICanvasColumn Column { get; }
Property Value
ControlType
Type of the control: 4 is a text part, 3 is a client side web part
int ControlType { get; }
Property Value
DataVersion
The internal storage version used for this control
string DataVersion { get; set; }
Property Value
InstanceId
Instance ID of the control
Guid InstanceId { get; set; }
Property Value
JsonControlData
Value of the control's "data-sp-controldata" attribute
string JsonControlData { get; }
Property Value
Order
Order of the control in the control collection
int Order { get; set; }
Property Value
Section
The ICanvasSection hosting this control
ICanvasSection Section { get; }
Property Value
Type
Type if the control (IPageText or IPageWebPart)
Type Type { get; }
Property Value
Methods
Delete()
Removes the control from the page
void Delete()
Move(ICanvasColumn)
Moves the control to another section and column
void Move(ICanvasColumn newColumn)
Parameters
newColumnICanvasColumnNew column that will host the control
Move(ICanvasColumn, int)
Moves the control to another section and column
void Move(ICanvasColumn newColumn, int order)
Parameters
newColumnICanvasColumnNew column that will host the control
orderintNew order for the control in the new column
Move(ICanvasSection)
Moves the control to another section and column
void Move(ICanvasSection newSection)
Parameters
newSectionICanvasSectionNew section that will host the control
Move(ICanvasSection, int)
Moves the control to another section and column
void Move(ICanvasSection newSection, int order)
Parameters
newSectionICanvasSectionNew section that will host the control
orderintNew order for the control in the new section
MovePosition(ICanvasColumn)
Moves the control to another section and column while keeping it's current position
void MovePosition(ICanvasColumn newColumn)
Parameters
newColumnICanvasColumnNew column that will host the control
MovePosition(ICanvasColumn, int)
Moves the control to another section and column in the given position
void MovePosition(ICanvasColumn newColumn, int position)
Parameters
newColumnICanvasColumnNew column that will host the control
positionintNew position for the control in the new column
MovePosition(ICanvasSection)
Moves the control to another section and column while keeping it's current position
void MovePosition(ICanvasSection newSection)
Parameters
newSectionICanvasSectionNew section that will host the control
MovePosition(ICanvasSection, int)
Moves the control to another section and column in the given position
void MovePosition(ICanvasSection newSection, int position)
Parameters
newSectionICanvasSectionNew section that will host the control
positionintNew position for the control in the new section
MovePosition(int)
Moves the control inside the current column to a new position
void MovePosition(int position)
Parameters
positionintNew position for this control