ImageElement Class
Namespace: Stride.UI.ControlsAssembly: Stride.UI.dll
Represents a control that displays an image.
Derived from ImageElement:
[DataContract("ImageElement")]
public class ImageElement : UIElement, IUIElementUpdate, IUIElementChildren, IIdentifiable
Name | Description | |
---|---|---|
Properties | ||
Color | Gets or set the color used to tint the image. Default value is White/>. |
|
Source | Gets or sets the ISpriteProvider for the image. |
|
StretchDirection | Gets or sets a value that indicates how the image is scaled. |
|
StretchType | Gets or sets a value that describes how the image should be stretched to fill the destination rectangle. |
|
Methods | ||
ArrangeOverride(Vector3) | ||
MeasureOverride(Vector3) | ||
Update(GameTime) |
Properties
Color
Gets or set the color used to tint the image. Default value is White/>.
[DataMember]
[Display(null, "Appearance")]
public Color Color { get; set; }
Property Value
Type | Description |
---|---|
Color |
Remarks
The initial image color is multiplied by this color.
Source
Gets or sets the ISpriteProvider for the image.
[DataMember]
[Display(null, "Appearance")]
public ISpriteProvider Source { get; set; }
Property Value
Type | Description |
---|---|
ISpriteProvider |
StretchDirection
Gets or sets a value that indicates how the image is scaled.
[DataMember]
[Display(null, "Layout")]
public StretchDirection StretchDirection { get; set; }
Property Value
Type | Description |
---|---|
StretchDirection |
StretchType
Gets or sets a value that describes how the image should be stretched to fill the destination rectangle.
[DataMember]
[Display(null, "Layout")]
public StretchType StretchType { get; set; }
Property Value
Type | Description |
---|---|
StretchType |
Methods
ArrangeOverride(Vector3)
protected override Vector3 ArrangeOverride(Vector3 finalSizeWithoutMargins)
Parameters
Type | Name | Description |
---|---|---|
Vector3 | finalSizeWithoutMargins |
Returns
Type | Description |
---|---|
Vector3 |
Overrides
MeasureOverride(Vector3)
protected override Vector3 MeasureOverride(Vector3 availableSizeWithoutMargins)
Parameters
Type | Name | Description |
---|---|---|
Vector3 | availableSizeWithoutMargins |
Returns
Type | Description |
---|---|
Vector3 |
Overrides
Update(GameTime)
protected override void Update(GameTime time)
Parameters
Type | Name | Description |
---|---|---|
GameTime | time |