How to set the visibility of a ProgessBar in WPF?
问题 I just recently began working with WPF and am trying to implement a ProgressBar but can't get it to do what I want. All I want is for the UI to show the progress bar while a task is occurring, but it should not be visible otherwise. This what I have in the xaml: <ProgressBar x:Name="pbarTesting" HorizontalAlignment="Left" Height="37" Margin="384,301,0,0" VerticalAlignment="Top" Width="264" IsHitTestVisible="True" IsIndeterminate="True" Visibility="Collapsed"/> And in the application I wrote: