Hi Kins,
Good day to you.
You cannot change the height of the card component directly in Blazor but you achieve this requirement using the CSS.
We have prepared a sample for your reference. In this sample, we have changed the CssClass property using the button click. So corresponding style will be applied to the card.
Code Snippets:
<button class="e-btn" @onclick="@OnClick">Change</button> <SfCard ID="FirstCard" CssClass="@cssClass">
<CardContent>
<SfTextBox CssClass="e-outline" Placeholder="Outlined" FloatLabelType="@FloatLabelType.Auto"></SfTextBox>
. . .
</CardContent>
</SfCard>
@code {
public string cssClass { get; set; } = "staticHeight";
public void OnClick()
{
cssClass = "dynamicHeight";
}
}
<style>
.staticHeight {
height: 300px;
}
.dynamicHeight {
height: 400px;
}
.e-card .e-card-content {
overflow-y: auto;
} </style>
|
Regards,
Gunasekar