Hi I am using the busy indicator while I have a simulator setting it self up. I need to give the user a method to perform an emergency stop if needed. I tried adding a button to the data template but clicking it seems to do nothing. Can this be done? Below is the XMAL and command definition
.
<
telerik:RadBusyIndicator
IsIndeterminate
=
"True"
IsBusy
=
"{Binding IsVehicleRotating}"
>
<
telerik:RadBusyIndicator.BusyContentTemplate
>
<
DataTemplate
>
<
Grid
HorizontalAlignment
=
"Center"
VerticalAlignment
=
"Center"
>
<
Grid.RowDefinitions
>
<
RowDefinition
></
RowDefinition
>
<
RowDefinition
Height
=
"23"
></
RowDefinition
>
</
Grid.RowDefinitions
>
<
diControls:DILabel
>
Vehicle is rotating
</
diControls:DILabel
>
<
diControls:DIButton
Grid.Row
=
"1"
>
Emergency Stop
</
diControls:DIButton
>
</
Grid
>
</
DataTemplate
>
</
telerik:RadBusyIndicator.BusyContentTemplate
>
<!--Content is here-->
</
telerik:RadBusyIndicator
>
private RelayCommand emergencyStopCommand;
public RelayCommand EmergencyStopCommand
{
get
{
return emergencyStopCommand ?? (emergencyStopCommand = new RelayCommand(() =>
{
IsVehicleRotating = false;
vehicleStateController.EmergencyStop();
Cleanup();
}
));
}
}