Execute Command
Allows a command to be executed upon initialization (and repeated).
Last updated
Allows a command to be executed upon initialization (and repeated).
Last updated
⚙️ Powered by Rock RMS
Inherits from Microsoft.Maui.Controls.ContentView
The ExecuteCommand
control is a simple and flexible way to execute commands with customizable timing and repetition. It’s ideal for use cases like delayed actions or periodic updates.
Delay
int
The delay interval (in milliseconds) before the command executes.
Repeat
bool
Indicates if the command should repeat. Repeat indefinitely if RepeatCount
is not specified.
RepeatCount
int
The number of times the command repeats. Use -1
for unlimited.
StartWithExecution
bool
If true
, the command executes immediately before starting the delay timer.
Command
ICommand
The command to execute.
CommandParameter
object
A parameter passed to the command when executed.
In this example we used in an app to welcome people with a periodic toast message like, "Welcome to Rock Solid Church!!".
Command: Bound to the ShowToast
command, which handles the logic for displaying the message.
CommandParameter: Passes the string "Welcome to Rock Solid Church!!"
as a parameter to the command.
Delay: Specifies a 3-second delay (3000 ms) before executing the command.
Repeat: Ensures the command executes repeatedly execute (Repeat indefinitely if the RepeatCount
is not specified).