|
@page "/"
@using Syncfusion.Blazor.ProgressBar;
@using Syncfusion.Blazor.Popups;
<div class="col-lg-12 control-section" id="target">
<div>
@if (this.ShowButton)
{
<button class="e-btn" @onclick="@OnBtnclicked">Open</button>
}
</div>
<SfDialog Header="Current Progress" Target="#target" Width="500px" ShowCloseIcon="true" @bind-Visible="Visibility">
<DialogTemplates>
<Content>
@if (ShowProgressIndicator)
{
<SfProgressBar @ref="p" Value="80" Height="50px" Width="100%" ShowProgressValue="true">
<ProgressBarAnimation Enable="true"></ProgressBarAnimation>
</SfProgressBar>
}
</Content>
</DialogTemplates>
<DialogEvents Opened="@opened" OnOpen="@DialogOpen" Closed="@DialogClose"></DialogEvents>
</SfDialog>
</div>
@code{
SfProgressBar p { get; set; }
public bool ShowProgressIndicator { get; set; }
public bool Visibility { get; set; } = false;
public bool ShowButton { get; set; } = true;
public void opened(Object args)
{
ShowProgressIndicator = true;
}
public void DialogOpen(Object args)
{
this.ShowButton = false;
}
public void DialogClose(Object args)
{
this.ShowButton = true;
}
public void OnBtnclicked()
{
this.Visibility = true;
}
} |