How to show progress animation without knowing percentage of its completeness?
In a WPF application I need to show user that some process is in progress and one should wait. I don't need to show particular percentage of completeness of this process, moreover, I don't exactly know it.
What is the way to do it? Some special settings of the progress bar or maybe th开发者_JAVA百科ere are other common ways to show animation of this kind?
Use a ProgressBar and set IsIndeterminate to true. This is the standard way of signaling that progress is occurring, but that it cannot be measured or even estimated.
Dim aniOpacity As New DoubleAnimation()
aniOpacity.From = 0.1
aniOpacity.To = 1
Dim timeSpanDuration As New TimeSpan(0, 0, lngTakt / 1000)
aniOpacity.Duration = New Duration(timeSpanDuration)
Me.aProgressBar.BeginAnimation(ProgressBar.ValueProperty, aniOpacity)
I not sure, if this is, what you searched. But I don't know, how you want to set a progressbar, if you don't know the state of the progress.
// EDIT: Sorry, now i know what you mean. You can put the code in a loop. If you are finished with your process you stop the loop.
精彩评论