Building a responsive UI with WinUI 3
In this section, we will look at how to provide user feedback using the ProgressRing
component while performing a long-running operation in WinUI 3 applications. When your users trigger a long-running operation that holds up the UI, it is a good idea to provide user feedback until the operation completes. Let’s write a simple application that simulates a long-running operation using the following steps:
- Start a new WinUI3 application and call it
CH12_ResponsiveWinUI3
. - Open
MainWindow.xaml
and replace the existing XAML between the Window tags with the following XAML:<StackPanel VerticalAlignment=”Center” HorizontalAlignment=”Center”> <ProgressRing x:Name=”ProgressRingIndicator1” IsActive=”{x:Bind IsWorking, Mode=OneWay}” ...