.NET MAUI TemplatedButton Command
The Telerik .NET MAUI TemplatedButton allows you to attach a command that executes when the button is clicked.
-
Command
(ICommand
)—Defines the command which executes when the button is clicked. -
CommandParameter
(object
)—Specifies the parameter of the command which executes when the button is clicked.
Using the Command
The following example demonstrates how to use the Command
to change the text displayed within the ToggledButton on click.
1. Define the TemplatedButton in XAML:
2. Add the telerik
namespace:
3. Add the ViewModel
:
This is the result on WinUI:
For a runnable example demonstrating the TemplatedButton Command, see the SDKBrowser Demo Application and go to the TemplatedButton > Features category.