Table of Contents

Class ImageButton

Namespace
Stride.UI.Controls
Assembly
Stride.UI.dll
[DataContractMetadataType(typeof(ImageButton.ImageButtonMetadata))]
[Obsolete("Use Button with SizeToContent set to false.")]
public class ImageButton : Button, IUIElementUpdate, IUIElementChildren, IIdentifiable
Inheritance
ImageButton
Implements
Inherited Members
Extension Methods

Constructors

ImageButton()

public ImageButton()

Properties

Content

The current content of the ImageButton, that is the current image used.

public override UIElement Content { set; }

Property Value

UIElement

Remarks

The Content of a ImageButton is determined by its state (pressed/not pressed) and the value of PressedImage and NotPressedImage. The Content cannot be set manually by the user.

Exceptions

InvalidOperationException

The user tried to modify the ImageButton content.

IsPressed

Gets a value that indicates whether the button is currently down.

public override bool IsPressed { get; protected set; }

Property Value

bool

Methods

OnAspectImageInvalidated()

Function triggered when one of the PressedImage and NotPressedImage images are invalidated. This function can be overridden in inherited classes.

protected override void OnAspectImageInvalidated()