Hi Benjamin,
Greetings from Syncfusion support.
We have validated your requirement at our end. We have achieved your requirement with the help of the below code. We have prepared a sample for your reference and it can be available below.
[Index.razor]
|
@using Syncfusion.Blazor.Cards
<SfCard ID="BasicCard" @onclick="OnClick">
<CardHeader Title="@Title" />
<CardContent Content="@Content" />
</SfCard>
@code{
bool Clicked = false;
public string Title { get; set; } = "Debunking Five Data Science Myths";
public string TempTitle { get; set; } = "Debunking Five Data Science Myths";
public string Content { get; set; } = "Tech evangelists are currently pounding their pulpits about all things AI, machine learning, analytics—anything that sounds";
public string TempContent { get; set; } = "Tech evangelists are currently pounding their pulpits about all things AI, machine learning, analytics—anything that sounds";
void OnClick()
{
Clicked = !Clicked;
if(Clicked)
{
Title = "Test title";
Content = "Test Content";
} else
{
Title = TempTitle;
Content = TempContent;
}
} |
Kindly try the above sample and get back to us if you need any further assistance.
Regards,
Ravikumar Venkatesan