Class Button
Button control
public class Button : ButtonBase, ICloneable
- Inheritance
-
objectButton
- Implements
- Inherited Members
Constructors
Button()
public Button()
Properties
CustomStyle
A custom style for this button - no auto-update
public string CustomStyle { get; set; }
Property Value
ImageAlpha
The level of transparency of the image from 0 (invisible) to 255 (solid)
public byte ImageAlpha { get; set; }
Property Value
ImageFile
The file containing a custom image to display on the button, drawn underneath any Text
public string ImageFile { get; set; }
Property Value
Remarks
Assigning the value this already has is a no-op, so scripts can set this on every frame without reloading the texture each time.
ImageFileValid
public bool ImageFileValid { get; }
Property Value
ImageLocation
The upper left corner of the area in the image file to use
public Point ImageLocation { get; set; }
Property Value
ImagePadding
The space between the button's edges and its ImageFile, in unscaled dialog units
public Padding ImagePadding { get; set; }
Property Value
ImageSize
The distance to the lower right corner of the area in the image file to use
public Size ImageSize { get; set; }
Property Value
StyleValid
public bool StyleValid { get; }
Property Value
Text
The text displayed on the control
public override string Text { get; set; }
Property Value
Methods
Clone()
Creates a deep copy of this instance.
public override Control Clone()
Returns
CloneButton()
Creates a deep copy of this Button instance.
public Button CloneButton()
Returns
CloneFromTo(Button, Button)
Copies all members declared by Button from one instance to another.
protected static void CloneFromTo(Button from, Button to)
Parameters
OnLayoutUpdated()
Called after EffectiveLocation/EffectiveSize have been (re-)calculated, e.g. following a Scale change.
protected override void OnLayoutUpdated()
ShouldSerializeImageFile()
public bool ShouldSerializeImageFile()
Returns
ShouldSerializeImageLocation()
public bool ShouldSerializeImageLocation()
Returns
ShouldSerializeImagePadding()
public bool ShouldSerializeImagePadding()
Returns
ShouldSerializeImageSize()
public bool ShouldSerializeImageSize()