Spread Windows Forms 13.0 Product Documentation
FarPoint.Win Assembly / FarPoint.Win Namespace / ElementControl Class / PictureOrientation Property
Example


In This Topic
    PictureOrientation Property (ElementControl)
    In This Topic
    Gets or sets the orientation of the picture in the control.
    Syntax
    'Declaration
     
    Public Overridable Property PictureOrientation As PictureOrientation
    'Usage
     
    Dim instance As ElementControl
    Dim value As PictureOrientation
     
    instance.PictureOrientation = value
     
    value = instance.PictureOrientation
    public virtual PictureOrientation PictureOrientation {get; set;}

    Property Value

    PictureOrientation setting that determines the orientation of the picture
    Remarks

    Set this property to specify the orientation of the picture. Specify the picture to display using the Picture property.

    Specify the alignment for the contents in a control using the AlignHorz and AlignVert properties.

    You can work with the positioning of the picture by setting the MarginTop, MarginBottom, MarginLeft, and MarginRight properties.

    You can also set the PictureMargin property to specify the margin to use between the picture and the text in the control.

    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";
    private void button1_Click(object sender, System.EventArgs e)
    {
    // Turn off the No Smoking sign
    control.Visible=false;
    }
    
    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"
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
    'Turn off the NO Smoking sign
    control.Visible = False
    End Sub
    
    See Also