Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Gets or sets the vertical spacing, in pixels, on the top and bottom of the image.
Namespace: Microsoft.SharePoint.Publishing.Fields
Assembly: Microsoft.SharePoint.Publishing (in Microsoft.SharePoint.Publishing.dll)
Syntax
'Declaration
Public Property VerticalSpacing As Integer
Get
Set
'Usage
Dim instance As ImageFieldValue
Dim value As Integer
value = instance.VerticalSpacing
instance.VerticalSpacing = value
public int VerticalSpacing { get; set; }
Property Value
Type: System.Int32
The vertical spacing on the top and bottom of the image, in pixels. Default is 0.
Remarks
The value of this property is the vspace attribute of the <IMG> tag in the output of the ToString method.
Examples
// You can change any of the following data that are set into the ImageFieldValue
private const string NewImageUrl = "/SiteCollectionImages/SampleImage.jpg";
private const string NewHyperlink = "/Pages/SamplePage.aspx";
private const bool NewOpenHyperlinkInNewWindow = true;
private const string NewAlignment = "right";
private const string NewAlternateText = "Sample alternate text for the image";
private const int NewBorderWidth = 4;
private const int NewHeight = 100;
private const int NewWidth = 150;
private const int NewHorizontalSpacing = 10;
private const int NewVerticalSpacing = 15
Note
This example is part of the larger ImageFieldValue sample in the ImageFieldValue topic.