Custom kabanmodel

hi,

im converting my project from xamarin to maui. now i trying to use kaban but cant do a custom kabanmodel to add more info in the card  it give an error. i have atached project exemple case. it is because the component not suport?, or what i doing wrong .

Microsoft.Maui.Controls.Xaml.Diagnostics.BindingDiagnostics: Warning: 'ViewModel+CustomKanbanModel, ViewModel+CustomKanbanModel, ViewModel+CustomKanbanModel, ViewModel+CustomKanbanModel, ViewModel+CustomKanbanModel' cannot be converted to type 'System.Collections.ObjectModel.ObservableCollection`1[Syncfusion.Maui.Kanban.KanbanModel]'

Thanks.


Attachment: syncfusion_test_66150495.zip

1 Reply 1 reply marked as answer

TG Tamilarasan Gunasekaran Syncfusion Team March 6, 2025 12:10 PM UTC

Hi Antonio,

Based on the provided details we have reviewed your query regarding Can’t do a custom Kabanmodel to add more info in the card.

Based on our review, we would like to inform you that the default type for the ItemsSource property of the .NET MAUI Kanban control is KanbanModel. If you require additional properties, you can achieve this by creating a custom model that inherits from KanbanModel.

To meet your requirement, you can create a cards collection of type KanbanModel and add cards by using your custom model class, as demonstrated below.

XAML:

<kanban:SfKanban ItemsSource="{Binding Cards}" 

                  HorizontalOptions="FillAndExpand"

                  VerticalOptions="FillAndExpand">

      

 </kanban:SfKanban>

C#:

public class ViewModel

{

    public ObservableCollection<KanbanModel> Cards { get; set; }

 

    public ViewModel()

    {

        Cards = new ObservableCollection<KanbanModel>();

        Cards.Add(new CustomKanbanModel()

        {

            ID = 1,

            Title = "iOS - 1002",

            ImageURL = "People_Circle1.png",

            Category = "Open",

            Description = "Analyze customer requirements",

            IndicatorFill = Colors.Red,

            Tags = new List<string> { "Incident", "Customer" }

 

        });

        Cards.Add(new CustomKanbanModel

        {

            ID = 6,

            Title = "Xamarin - 4576",

            ImageURL = "People_Circle2.png",

            Category = "Open",

            Description = "Show the retrieved data from the server in grid control",

            IndicatorFill = Colors.Green,

            Tags = new List<string> { "Story", "Customer" }

        });

}

}

We have prepared a simple sample demonstrating this. Please check the attached sample for your reference.

If you have any further questions or require assistance with any other aspect, please don't hesitate to let us know. We are here to help.

Regards,
Tamilarasan G.


Attachment: syncfusion_test_66150495_d572abf1.zip

Marked as answer
Loader.
Up arrow icon