Class BOBAspectRatio
- Namespace
- BlazOrbit.Components
- Assembly
- BlazOrbit.dll
[GenerateComponentInfo]
public class BOBAspectRatio : BOBComponentBase, IBuiltComponent
- Inheritance
-
objectComponentBaseBOBAspectRatio
- Implements
- Inherited Members
Constructors
BOBAspectRatio()
public BOBAspectRatio()
Properties
ChildContent
Inner content stretched to fill the constrained box.
[Parameter]
public RenderFragment? ChildContent { get; set; }
Property Value
- RenderFragment
Ratio
CSS aspect-ratio value. Accepts ratios in slash form ("16/9",
"4/3", "1/1") or any other valid aspect-ratio token. Defaults to
"16 / 9".
[Parameter]
public string Ratio { get; set; }
Property Value
- string
Methods
BuildComponentCssVariables(Dictionary<string, string>)
Contributes additional CSS custom properties to the inline style attribute. Keys
that collide with framework-owned --bob-inline-* variables will be overwritten.
public void BuildComponentCssVariables(Dictionary<string, string> cssVariables)
Parameters
cssVariablesDictionary<string, string>
BuildComponentDataAttributes(Dictionary<string, object>)
Contributes additional data- attributes to the root element. Keys that collide
with framework-owned data-bob- attributes will be overwritten.
public void BuildComponentDataAttributes(Dictionary<string, object> dataAttributes)
Parameters
dataAttributesDictionary<string, object>
BuildRenderTree(RenderTreeBuilder)
Renders the component to the supplied Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder.
protected override void BuildRenderTree(RenderTreeBuilder __builder)
Parameters
__builderRenderTreeBuilder