Intersoft.Client.UI.Navigation Namespace > UXPage Class : IsBusy Property |
ClientUI navigation framework includes built-in busy state management feature which helps to streamline the busy state implementation in your navigation application. You set the IsBusy property of the UXPage to true when the page is processing particular operations, such as asynchronous data retrieval from server. Likewise, you set the IsBusy property to false when the operation has completed.
The busy state management architecture is designed in such a way that intuitive to developers. The UXFrame automatically reacts when the active page propagates the changes of its IsBusy property. Consequently, this significantly reduces development effort by eliminating the needs to implement the busy indicator manually in each page.
With a single dependency property to handle the IsBusy state, this design is also an ideal solution for MVVM pattern development. You can easily bind the IsBusy property to your ViewModel and then execute the operation within your ViewModel. For more information, see Advanced Features in ClientUI Navigation Framework.
For more information about application development with MVVM pattern, see MVVM Pattern Overview.
<Intersoft:UXPage ... xmlns:Intersoft="http://intersoft.clientui.com/schemas" xmlns:ViewModels="clr-namespace:ClientUIBusinessApp1.ViewModels" x:Class="ClientUIBusinessApp1.RegisterForm" IsBusy="{Binding Path=IsBusy}"> <Intersoft:UXPage.DataContext> <ViewModels:RegisterFormViewModel/> </Intersoft:UXPage.DataContext> <Grid x:Name="LayoutRoot"> ... </Grid> </Intersoft:UXPage>
public class RegisterFormViewModel : ValidationViewModelBase { // Fields private bool _isBusy = false; // Views public bool IsBusy { get { return _isBusy; } private set { if (_isBusy != value) { _isBusy = value; OnPropertyChanged("IsBusy"); } } } // Methods private void ExecuteCreateAccount(object parameter) { if (this.Validate()) { // Enables the page's busy state. // This will block user interaction while the login // is being processed and optionally display busy indicator. IsBusy = true; // Perform asynchronous server-side call to create user account _registrationContext.CreateUser(this.RegistrationData, this.RegistrationData.Password, this.SelectedRoles, CreateAccount_Completed, null); } else { this.FocusErrorField(); } } ... }
Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2