Class PictureBoxStyleProperties
Provides custom properties specific for PictureBox control. All properties support the style inheritance mechanism. You can change these properties in the property grid.
Inherited Members
Namespace: Syncfusion.GridHelperClasses
Assembly: Syncfusion.GridHelperClasses.Windows.dll
Syntax
public class PictureBoxStyleProperties : GridStyleInfoCustomProperties
Constructors
PictureBoxStyleProperties()
Initializes a new instance of the PictureBoxStyleProperties class. Design time environment will use this ctor and later copy the values to a style object by calling style.CustomProperties.Add(gridExcelTipStyleProperties1)
Declaration
public PictureBoxStyleProperties()
PictureBoxStyleProperties(GridStyleInfo)
Initializes a new instance of the PictureBoxStyleProperties class.
Declaration
public PictureBoxStyleProperties(GridStyleInfo style)
Parameters
Type | Name | Description |
---|---|---|
GridStyleInfo | style | Cell style information. |
Properties
Default
Gets an access to default values for this type.
Declaration
public static PictureBoxStyleProperties Default { get; }
Property Value
Type |
---|
PictureBoxStyleProperties |
HasImage
Gets a value indicating whether image state has been initialized for the current object.
Declaration
public bool HasImage { get; }
Property Value
Type |
---|
System.Boolean |
HasSizeMode
Gets a value indicating whether SizeMode state has been initialized for the current object.
Declaration
public bool HasSizeMode { get; }
Property Value
Type |
---|
System.Boolean |
Image
Gets or sets the image that the PictureBox displays.
Declaration
public Image Image { get; set; }
Property Value
Type |
---|
System.Drawing.Image |
SizeMode
Gets or sets a value to indicate how the image is displayed.
Declaration
public PictureBoxSizeMode SizeMode { get; set; }
Property Value
Type |
---|
System.Windows.Forms.PictureBoxSizeMode |
Remarks
Valid values for this property are taken from the PictureBoxSizeMode enumeration. By default, in PictureBoxSizeMode.Normal mode, the Image is placed in the upper left corner of the PictureBox, and any part of the image too big for the PictureBox is clipped. Using the PictureBoxSizeMode.StretchImage value causes the image to stretch to fit the PictureBox.
Using the PictureBoxSizeMode.AutoSize value causes the control to resize to always fit the image. Using the PictureBoxSizeMode.CenterImage value causes the image to be centered in the client area.
Methods
Initialize()
Force static ctor being called at least once.
Declaration
public static void Initialize()
ResetImage()
Resets Image state.
Declaration
public void ResetImage()
ResetSizeMode()
Resets SizeMode state.
Declaration
public void ResetSizeMode()
Operators
Explicit(GridStyleInfo to PictureBoxStyleProperties)
Explicit cast from GridStyleInfo to this custom property object.
Declaration
public static explicit operator PictureBoxStyleProperties(GridStyleInfo style)
Parameters
Type | Name | Description |
---|---|---|
GridStyleInfo | style | Cell style information. |
Returns
Type | Description |
---|---|
PictureBoxStyleProperties | A new custom properties object. |