Couldn't help peeking. The Toolkit's BusyIndicator does disable/re-enable the DataForm but that has no influence on the DataForm's CommandButtons. Aaargh! Maybe they'll fix that someday.
How do I know this?
(1) I confirmed your experience of clicking the navigation buttons while the form was supposedly disabled.
(2) In the code-behind I listened to the EmployeeDataForm.IsEnabledChanged event ... which dutifully toggled in sync with the BusyIndicator.IsBusy property.
There is no obvious way to talk to the CommandButtons directly (see what I mean about Swiss Army Knife?).
You can control their visibility. One palliative approach is to hide the buttons when busy. I took a quick crack at it (remember, this is a DEMO).
Three Steps:
1) Bind the DataForm's CommandButtonsVisibility to IsBusy in MainPage.xaml
Binding will need a ValueConverter because Visibility takes an enumeration and IsBusy is boolean
2) Add a ValueConverter as a resource in MainPage.xaml
3) Write the ValueConverter in the first place
Of course I actually proceeded in reverse: 3,2,1
3) Add Value Converter
namespace SimpleSteps {
public class HideDataFormCommandVisibilityConverter : IValueConverter {
public HideDataFormCommandVisibilityConverter() {
CommandButtonsVisibility = DataFormCommandButtonsVisibility.All;
}
public DataFormCommandButtonsVisibility? CommandButtonsVisibility {get; set;}
public object Convert(object value, System.Type targetType,
object parameter, System.Globalization.CultureInfo culture) {
if (value.GetType() != typeof(bool)) return null;
return ((bool) value) ? DataFormCommandButtonsVisibility.None : CommandButtonsVisibility;
}
public object ConvertBack(object value, System.Type targetType,
object parameter, System.Globalization.CultureInfo culture) {
return null;
}
}
}
2) Add Resource to UserControl.Resources
<UserControl x:Class="SimpleSteps.MainPage"
...
xmlns:local="clr-namespace:SimpleSteps" >
<UserControl.Resources>
<local:HideDataFormCommandVisibilityConverter
x:Key="HideEmployeeCommandsConverter"
CommandButtonsVisibility="Navigation, Add, Delete, Cancel, Commit"/>
</UserControl.Resources>
3) Bind DataForm's CommandButtonsVisibility
<toolkit:DataForm Name="EmployeeDataForm" Grid.Row="0"
ItemsSource="{Binding Employees}"
EditEnded="dataForm1_EditEnded"
CurrentItem ="{Binding CurrentEmployee, Mode=TwoWay}"
CommandButtonsVisibility="{Binding IsBusy,
Converter={StaticResource HideEmployeeCommandsConverter}, Mode=TwoWay}"
/>
I remind you again that this is demo code. Plenty of other gotchas; there is no error handling, for example ... as the code makes clear with plenty of "ToDo" comments.
HTH