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
Classname
protected string Classname { get; }
Property Value
Elevation
The size of the drop shadow for this image.
[Parameter]
[Category("Appearance")]
public int Elevation { get; set; }
Property Value
Remarks
Defaults to 0
.
Fluid
Scales this image to the parent container.
[Parameter]
[Category("Behavior")]
public bool Fluid { get; set; }
Property Value
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
Remarks
Defaults to Fill.
ObjectPosition
Controls how this image is positioned within its container.
[Parameter]
[Category("Appearance")]
public ObjectPosition ObjectPosition { get; set; }
Property Value
Remarks
Defaults to Center.
Src
The path to the image.
[Parameter]
[Category("Behavior")]
public string? Src { get; set; }
Property Value
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