From 71f06089f9e1eb2df4d76367f7077fd3d7f19237 Mon Sep 17 00:00:00 2001 From: KB Bot Date: Thu, 29 Feb 2024 10:52:30 +0000 Subject: [PATCH 1/7] Added new kb article migrating-xamarin-checkbox-maui-checkbox --- ...igrating-xamarin-checkbox-maui-checkbox.md | 48 +++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 knowledge-base/migrating-xamarin-checkbox-maui-checkbox.md diff --git a/knowledge-base/migrating-xamarin-checkbox-maui-checkbox.md b/knowledge-base/migrating-xamarin-checkbox-maui-checkbox.md new file mode 100644 index 000000000..2418112ba --- /dev/null +++ b/knowledge-base/migrating-xamarin-checkbox-maui-checkbox.md @@ -0,0 +1,48 @@ +--- +title: CheckBoxUserCommand in MAUI CheckBox When Migrating from Xamarin Checkbox +description: Learn how to implement the CheckBoxUserCommand behavior in MAUI when migrating from Xamarin. +type: how-to +page_title: Migrating from Xamarin Checkbox to MAUI Checkbox +slug: migrating-xamarin-checkbox-maui-checkbox +tags: xamarin, maui, checkbox, migration +res_type: kb +--- + +## Environment + +| Version | Product | Author | +| --- | --- | ---- | +| 6.7.0 | Telerik UI for .NET MAUI CheckBox | [Dobrinka Yordanova](https://www.telerik.com/blogs/author/dobrinka-yordanova)| + + +## Description + +When migrating your Xamarin app to MAUI, you may notice that the CheckBoxUserCommand behavior is missing in the Telerik MAUI Checkbox control. This article will guide you on how to implement a similar scenario in MAUI. + +## Solution + +To achieve a similar behavior in MAUI, you can use the `IsCheckedChanged` event along with the `EventToCommandBehavior` from the Microsoft Community Toolkit for MAUI. + +**1.** Add the `EventToCommandBehavior` package to your MAUI project. You can find more information on how to do this in the [Microsoft Community Toolkit documentation](https://learn.microsoft.com/en-us/dotnet/communitytoolkit/maui/behaviors/event-to-command-behavior). + +**2.** In your MAUI XAML file, add the `RadCheckBox` control and the `EventToCommandBehavior` as a behavior. + +```xaml + + + + + +``` + +By using the `IsCheckedChanged` event and the `EventToCommandBehavior`, you can achieve a similar behavior to the `CheckBoxUserCommand` in the Xamarin Checkbox control. + +## Notes + +- Make sure to add the necessary namespaces for the `RadCheckBox` and `EventToCommandBehavior` controls in your XAML file. +- You may need to adjust the event handler or command binding based on your specific implementation. + +## See Also + +- [Migrating from Xamarin Checkbox to MAUI Checkbox](https://docs.telerik.com/devtools/maui/controls/checkbox/xamarin-migration) From b3aaf21d3b5af5eee90a6171d083887a55c1f933 Mon Sep 17 00:00:00 2001 From: Didi Yordanova <39412212+didiyordanova@users.noreply.github.com> Date: Thu, 7 Mar 2024 14:35:34 +0200 Subject: [PATCH 2/7] Update knowledge-base/migrating-xamarin-checkbox-maui-checkbox.md Co-authored-by: Iva Stefanova Koevska-Atanasova --- knowledge-base/migrating-xamarin-checkbox-maui-checkbox.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/knowledge-base/migrating-xamarin-checkbox-maui-checkbox.md b/knowledge-base/migrating-xamarin-checkbox-maui-checkbox.md index 2418112ba..12ac31bc3 100644 --- a/knowledge-base/migrating-xamarin-checkbox-maui-checkbox.md +++ b/knowledge-base/migrating-xamarin-checkbox-maui-checkbox.md @@ -17,7 +17,7 @@ res_type: kb ## Description -When migrating your Xamarin app to MAUI, you may notice that the CheckBoxUserCommand behavior is missing in the Telerik MAUI Checkbox control. This article will guide you on how to implement a similar scenario in MAUI. +When migrating your Xamarin app to MAUI, you may notice that the CheckBoxUserCommand behavior is missing in the Telerik MAUI CheckBox control. This article will show you how to implement a similar scenario in MAUI. ## Solution From f7d1892c770651faf618d68cde4c9f43186a805c Mon Sep 17 00:00:00 2001 From: Didi Yordanova <39412212+didiyordanova@users.noreply.github.com> Date: Thu, 7 Mar 2024 14:35:38 +0200 Subject: [PATCH 3/7] Update knowledge-base/migrating-xamarin-checkbox-maui-checkbox.md Co-authored-by: Iva Stefanova Koevska-Atanasova --- knowledge-base/migrating-xamarin-checkbox-maui-checkbox.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/knowledge-base/migrating-xamarin-checkbox-maui-checkbox.md b/knowledge-base/migrating-xamarin-checkbox-maui-checkbox.md index 12ac31bc3..9eb3521b0 100644 --- a/knowledge-base/migrating-xamarin-checkbox-maui-checkbox.md +++ b/knowledge-base/migrating-xamarin-checkbox-maui-checkbox.md @@ -2,7 +2,7 @@ title: CheckBoxUserCommand in MAUI CheckBox When Migrating from Xamarin Checkbox description: Learn how to implement the CheckBoxUserCommand behavior in MAUI when migrating from Xamarin. type: how-to -page_title: Migrating from Xamarin Checkbox to MAUI Checkbox +page_title: Migrating the Xamarin Checkbox CheckBoxUserCommand to MAUI slug: migrating-xamarin-checkbox-maui-checkbox tags: xamarin, maui, checkbox, migration res_type: kb From 797132ab9d68752edf5af0efe92174215d41cc5e Mon Sep 17 00:00:00 2001 From: Didi Yordanova <39412212+didiyordanova@users.noreply.github.com> Date: Thu, 7 Mar 2024 14:35:43 +0200 Subject: [PATCH 4/7] Update knowledge-base/migrating-xamarin-checkbox-maui-checkbox.md Co-authored-by: Iva Stefanova Koevska-Atanasova --- knowledge-base/migrating-xamarin-checkbox-maui-checkbox.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/knowledge-base/migrating-xamarin-checkbox-maui-checkbox.md b/knowledge-base/migrating-xamarin-checkbox-maui-checkbox.md index 9eb3521b0..e4fe4eede 100644 --- a/knowledge-base/migrating-xamarin-checkbox-maui-checkbox.md +++ b/knowledge-base/migrating-xamarin-checkbox-maui-checkbox.md @@ -1,6 +1,6 @@ --- title: CheckBoxUserCommand in MAUI CheckBox When Migrating from Xamarin Checkbox -description: Learn how to implement the CheckBoxUserCommand behavior in MAUI when migrating from Xamarin. +description: Learn how to implement the Xamarin CheckBoxUserCommand behavior in MAUI when migrating from Xamarin. type: how-to page_title: Migrating the Xamarin Checkbox CheckBoxUserCommand to MAUI slug: migrating-xamarin-checkbox-maui-checkbox From 6ef81b03a0b009e9a13abd51d65092a986f7ea4c Mon Sep 17 00:00:00 2001 From: Didi Yordanova <39412212+didiyordanova@users.noreply.github.com> Date: Thu, 7 Mar 2024 14:35:48 +0200 Subject: [PATCH 5/7] Update knowledge-base/migrating-xamarin-checkbox-maui-checkbox.md Co-authored-by: Iva Stefanova Koevska-Atanasova --- knowledge-base/migrating-xamarin-checkbox-maui-checkbox.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/knowledge-base/migrating-xamarin-checkbox-maui-checkbox.md b/knowledge-base/migrating-xamarin-checkbox-maui-checkbox.md index e4fe4eede..250f7e116 100644 --- a/knowledge-base/migrating-xamarin-checkbox-maui-checkbox.md +++ b/knowledge-base/migrating-xamarin-checkbox-maui-checkbox.md @@ -1,5 +1,5 @@ --- -title: CheckBoxUserCommand in MAUI CheckBox When Migrating from Xamarin Checkbox +title: Implementing the CheckBoxUserCommand Behavior When Migrating from Xamarin CheckBox to MAUI CheckBox description: Learn how to implement the Xamarin CheckBoxUserCommand behavior in MAUI when migrating from Xamarin. type: how-to page_title: Migrating the Xamarin Checkbox CheckBoxUserCommand to MAUI From b168525b07c38ecfe67d547418ef7e461a099b36 Mon Sep 17 00:00:00 2001 From: Didi Yordanova <39412212+didiyordanova@users.noreply.github.com> Date: Thu, 7 Mar 2024 14:35:52 +0200 Subject: [PATCH 6/7] Update knowledge-base/migrating-xamarin-checkbox-maui-checkbox.md Co-authored-by: Iva Stefanova Koevska-Atanasova --- knowledge-base/migrating-xamarin-checkbox-maui-checkbox.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/knowledge-base/migrating-xamarin-checkbox-maui-checkbox.md b/knowledge-base/migrating-xamarin-checkbox-maui-checkbox.md index 250f7e116..fe4d1ea48 100644 --- a/knowledge-base/migrating-xamarin-checkbox-maui-checkbox.md +++ b/knowledge-base/migrating-xamarin-checkbox-maui-checkbox.md @@ -36,7 +36,7 @@ To achieve a similar behavior in MAUI, you can use the `IsCheckedChanged` event ``` -By using the `IsCheckedChanged` event and the `EventToCommandBehavior`, you can achieve a similar behavior to the `CheckBoxUserCommand` in the Xamarin Checkbox control. +By using the `IsCheckedChanged` event and the `EventToCommandBehavior`, you can achieve a similar behavior to the `CheckBoxUserCommand` in the Xamarin CheckBox control. ## Notes From e45f8aea5b2fc346be1cf1b3e45786bfbe674bf3 Mon Sep 17 00:00:00 2001 From: Dobrinka Yordanova Date: Thu, 7 Mar 2024 14:44:13 +0200 Subject: [PATCH 7/7] Address comments. --- controls/checkbox/xamarin-migration.md | 2 ++ .../adding-select-all-option-combobox-dropdown-net-maui.md | 2 ++ 2 files changed, 4 insertions(+) diff --git a/controls/checkbox/xamarin-migration.md b/controls/checkbox/xamarin-migration.md index 03a0a531d..97081b2e5 100644 --- a/controls/checkbox/xamarin-migration.md +++ b/controls/checkbox/xamarin-migration.md @@ -28,6 +28,8 @@ The tables in the following sections list any differences between the APIs of th | N/A | `CornerRadius` | | `CheckBoxUserCommand` | N/A | +Review the [Implementing the CheckBoxUserCommand Behavior When Migrating from Xamarin CheckBox to MAUI CheckBox]({%slug migrating-xamarin-checkbox-maui-checkbox%}) how-to article for more details how to define a command when the Telerik .NET MAUI CheckBox state changes. + ## See Also * [Migrating from Xamarin.Forms to .NET MAUI]({% slug migrate-to-net-maui %}) diff --git a/knowledge-base/adding-select-all-option-combobox-dropdown-net-maui.md b/knowledge-base/adding-select-all-option-combobox-dropdown-net-maui.md index f10fe1f70..40fc0d141 100644 --- a/knowledge-base/adding-select-all-option-combobox-dropdown-net-maui.md +++ b/knowledge-base/adding-select-all-option-combobox-dropdown-net-maui.md @@ -81,6 +81,8 @@ That's it! You have successfully added a **Select All** option in the drop-down >tip Next, customize the appearance of the **Select All** option to match your application's design. +If you want to use a command when the CheckBox state changes, review the [Implementing the CheckBoxUserCommand Behavior When Migrating from Xamarin CheckBox to MAUI CheckBox]({%slug migrating-xamarin-checkbox-maui-checkbox%}) how-to article. + ## See Also - [ComboBox Documentation]({%slug combobox-overview%}) \ No newline at end of file