Spread Windows Forms 15.0
FarPoint.Win Assembly / FarPoint.Win Namespace / ElementContainerControl Class / MarginTop Property
Example


In This Topic
    MarginTop Property (ElementContainerControl)
    In This Topic
    Gets or sets the margin between the top of the control and its contents.
    Syntax
    'Declaration
     
    
    Public Overridable Property MarginTop As Integer
    'Usage
     
    
    Dim instance As ElementContainerControl
    Dim value As Integer
     
    instance.MarginTop = value
     
    value = instance.MarginTop
    public virtual int MarginTop {get; set;}
    Example
    control.Picture = Image.FromFile(Application.StartupPath + "\\smokes.bmp");
    control.PictureMargin = 34;
    control.MarginTop = 3;
    control.MarginBottom = 3;
    control.MarginLeft = 3;
    control.MarginRight = 3;
    control.PictureOrientation = FarPoint.Win.PictureOrientation.PictureRotate180;
    control.AlignText = FarPoint.Win.TextAlign.TextLeftPictRight;
    control.AlignHorz = FarPoint.Win.HorizontalAlignment.Left;
    control.BackColor = Color.Red;
    control.Text = "NO SMOKING";
    control.Picture = Image.FromFile(Application.StartupPath & "\smokes.bmp")
    control.PictureMargin = 34
    control.MarginTop = 3
    control.MarginBottom = 3
    control.MarginLeft = 3
    control.MarginRight = 3
    control.PictureOrientation = FarPoint.Win.PictureOrientation.PictureRotate180
    control.MarginTop = 3
    control.MarginBottom = 3
    control.AlignText = FarPoint.Win.TextAlign.TextLeftPictRight
    control.AlignHorz = FarPoint.Win.HorizontalAlignment.Left
    control.BackColor = Color.Red
    control.Text = "NO SMOKING"
    See Also