बस अगर आप प्रगति पट्टी शुरू करने की कोशिश कर रहे हैं, लेकिन एक अनिश्चित बार के रूप में, तो आपको तैयार होने पर और समाप्त होने पर झूठी होने पर संपत्ति को IIndeterminate को सत्य पर सेट करना होगा।
तो दूसरे शब्दों में:
pbar.IsIndeterminate = true; //This starts your bar's animation
pbar.IsIndeterminate = false; //This stops your bar's animation
तुम क्यों आप इसे निम्नलिखित छद्म कोड में इस तरह देखो क्या करना चाहते हैं के रूप में संदर्भ देने के लिए:
//Some method that is going to start something that is going to take a while
public void StartLongRunningProcess()
{
//Make a call to a web service asynchronously etc...
//Start the animation for your progress bar
pbar.IsIndeterminate = true;
}
//The method (delegate) that handles the result, usually from an event.
//This method will handle the result of the asynchronous call
public void HandlerForLongRunningProcess()
{
//Do stuff with result from your asynchronous web service call etc...
//Stop the animation for your progress bar
pbar.IsIndeterminate = false;
}
मुझे पहले होने दो यह कहने के लिए कि मुझे यकीन नहीं है कि यह इस संपत्ति का इच्छित उपयोग है, लेकिन मैं कह सकता हूं कि यह निश्चित रूप से काम करता है।
आपके पास पहले स्थान पर 'IsIndeterminate = "True" क्यों है? –