|
<SfButton ID="btnTreatment" CssClass="e-custom" IconCss="e-icons e-DoubleArrowLeft" IconPosition="IconPosition.Left" Disabled="@OkayDisabled" OnClick="Click"></SfButton>
@code {
// To disable/enable the button on click
public bool OkayDisabled = false;
public void Click()
{
OkayDisabled = !OkayDisabled;
}
} |
|
<SfButton Content="Toggle" OnClick="toggle" HtmlAttributes="@primButton"></SfButton>
@code {
//Tooltip for button
private Dictionary<string, object> primButton = new Dictionary<string, object>()
{
{ "title", "Toggle Button"}
};
} |
|
<SfButton ID="btnTreatment" CssClass="e-custom" IconCss="e-icons e-DoubleArrowLeft" IconPosition="IconPosition.Left" Disabled="@OkayDisabled" OnClick="Click"></SfButton>
<SfButton Content="Toggle" OnClick="toggle" HtmlAttributes="@primButton"></SfButton>
@code {
private string display = "block";
//To hide/show the button
private void toggle()
{
if (display == "block")
{
display = "none";
} else
{
display = "block";
}
}
}
<style>
.e-custom {
display:@display;
border-radius: 25px;
height: 48px;
width: 48px;
}
</style> |
|
<style>
.e-DoubleArrowLeft::before {
content: '\e7ba';
color: yellow;
font-size: 40px;
margin: 0 -16px; // To position the icon
}
</style> |