Table of Contents

Class MudImage

Namespace
MudBlazor
Assembly
MudBlazor.dll

A simple component that displays an image.

public class MudImage : MudComponentBase, IComponent, IHandleEvent, IHandleAfterRender, IMudStateHasChanged
Inheritance
MudImage
Implements
Inherited Members
Extension Methods

Remarks

This component is equivalent to the img HTML tag.

Constructors

MudImage()

public MudImage()

Properties

Alt

The alternate text for this image.

[Parameter]
[Category("Behavior")]
public string? Alt { get; set; }

Property Value

string

Classname

protected string Classname { get; }

Property Value

string

Elevation

The size of the drop shadow for this image.

[Parameter]
[Category("Appearance")]
public int Elevation { get; set; }

Property Value

int

Remarks

Defaults to 0.

Fluid

Scales this image to the parent container.

[Parameter]
[Category("Behavior")]
public bool Fluid { get; set; }

Property Value

bool

Remarks

Defaults to false.

Height

The height of this image, in pixels.

[Parameter]
[Category("Appearance")]
public int? Height { get; set; }

Property Value

int?

Remarks

Defaults to null.

ObjectFit

Controls how this image is resized.

[Parameter]
[Category("Appearance")]
public ObjectFit ObjectFit { get; set; }

Property Value

ObjectFit

Remarks

Defaults to Fill.

ObjectPosition

Controls how this image is positioned within its container.

[Parameter]
[Category("Appearance")]
public ObjectPosition ObjectPosition { get; set; }

Property Value

ObjectPosition

Remarks

Defaults to Center.

Src

The path to the image.

[Parameter]
[Category("Behavior")]
public string? Src { get; set; }

Property Value

string

Width

The width of this image, in pixels.

[Parameter]
[Category("Appearance")]
public int? Width { get; set; }

Property Value

int?

Remarks

Defaults to null.

Methods

BuildRenderTree(RenderTreeBuilder)

protected override void BuildRenderTree(RenderTreeBuilder __builder)

Parameters

__builder RenderTreeBuilder