<SfProgressBar @ref="ProObj1" Type="ProgressType.Circular" StartAngle="240" EndAngle="120" Width="160px" Height="160px" Value="@progress_pct" TrackThickness="5" ProgressThickness="5" CornerRadius="CornerType.Round" Minimum="0" Maximum="100" Theme="@CurrentTheme">
<ProgressBarAnimation Enable="true" Duration="2000" Delay="0" /> <ProgressBarAnnotations> <ProgressBarAnnotation Content="@Annotation" /> </ProgressBarAnnotations> </SfProgressBar>
<div class="row" align="center">
<button id="reLoad" class="e-control e-btn e-lib e-outline e-primary" @onclick="ProgressRefresh">Reload</button> </div>
@code{ // add your additional code here int progress_pct = 1;
string Annotation;
public void ProgressRefresh()
{
progress_pct = 70; }
string CurrentUri; ProgressTheme CurrentTheme; protected override void OnInitialized() { CurrentUri = Navigation.Uri; if (CurrentUri.IndexOf("material") > -1) { CurrentTheme = ProgressTheme.Material; Annotation = "<div style='font-size:24px;font-weight:bold;color:#e91e63;fill:#0078D6'><span>100%</span></div>"; } else if (CurrentUri.IndexOf("fabric") > -1) { CurrentTheme = ProgressTheme.Fabric; Annotation = "<div style='font-size:24px;font-weight:bold;color:#0078D6;fill:#0078D6'><span>100%</span></div>"; } else if (CurrentUri.IndexOf("bootstrap4") > -1) { CurrentTheme = ProgressTheme.Bootstrap4; Annotation = "<div style='font-size:24px;font-weight:bold;color:#007bff;fill:#0078D6'><span>100%</span></div>"; } else if (CurrentUri.IndexOf("bootstrap") > -1) { CurrentTheme = ProgressTheme.Bootstrap; Annotation = "<div style='font-size:24px;font-weight:bold;color:#317ab9;fill:#0078D6'><span>100%</span></div>"; } else if (CurrentUri.IndexOf("highcontrast") > -1) { CurrentTheme = ProgressTheme.HighContrast; Annotation = "<div style='font-size:24px;font-weight:bold;color:#FFD939;fill:#0078D6'><span>100%</span></div>"; } else { CurrentTheme = ProgressTheme.Bootstrap4; Annotation = "<div style='font-size:24px;font-weight:bold;color:#007bff'><span>100%</span></div>"; } } }
// add your additional code here |