-
Notifications
You must be signed in to change notification settings - Fork 26
977013-[Dev] MAUI Kanban UG document updated regarding custom mapping feature #3556
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Build Status: INPROGRESS 🔃 |
CI Status: SUCCESS ✅ |
Build Status: INPROGRESS 🔃 |
CI Status: SUCCESS ✅ |
MAUI/Kanban-Board/Cards.md
Outdated
{% endtabs %} | ||
|
||
N> When using a custom model as the [`ItemsSource`](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.Kanban.SfKanban.html#Syncfusion_Maui_Kanban_SfKanban_ItemsSource), the binding context for each card is set to an instance of that custom model. This means that all data bindings within the [`CardTemplate`](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.Kanban.SfKanban.html#Syncfusion_Maui_Kanban_SfKanban_CardTemplate) should reference the properties of your custom model directly. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use below content
-
When a custom data model is assigned to the
ItemsSource
property of theSfKanban
control, each card'sBindingContext
is set to an instance of that model. Therefore, bindings within theCardTemplate
must directly reference the properties defined in the custom model. -
The default card UI is not applicable when using a custom model. To render the card content correctly, you must define a custom
DataTemplate
using theCardTemplate
property.
Move these changes to here - https://github.com/syncfusion-content/maui-docs/pull/3556/files#diff-32936bde17a7640f7a2f8e8c0d257094b7678e882ac0b7fd34111546624f1e74R22

There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed to below content.
MAUI/Kanban-Board/Cards.md
Outdated
{% endtabs %} | ||
|
||
N> When using a custom model as the [`ItemsSource`](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.Kanban.SfKanban.html#Syncfusion_Maui_Kanban_SfKanban_ItemsSource), the binding context for each card is set to an instance of that custom model. This means that all data bindings within the [`CardTemplate`](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.Kanban.SfKanban.html#Syncfusion_Maui_Kanban_SfKanban_CardTemplate) should reference the properties of your custom model directly. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use below content:
When using a custom model, the default card UI is not applied. You must define a custom DataTemplate
via the CardTemplate
property to render the card content.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed the content as specified and raised new PR #3574.
Reverted the changes in this PR.
MAUI/Kanban-Board/Column.md
Outdated
@@ -277,3 +277,353 @@ kanban.Columns.Add(todoColumn); | |||
{% endhighlight %} | |||
|
|||
{% endtabs %} | |||
|
|||
## Appearance Customization |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Customize column appearance
The .NET MAUI Kanban control allows you to customize the column's background, no card template UI, placeholder style, and more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Modified as above and raised new PR #3575
MAUI/Kanban-Board/Column.md
Outdated
|
||
## Appearance Customization | ||
|
||
### Customizing Backgrounds |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Customize the column background
Use the Background
property of the KanbanColumn
to customize the background color of each column in the Kanban control.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Modified as above and raised new PR - #3575
MAUI/Kanban-Board/Column.md
Outdated
|
||
{% highlight xaml %} | ||
|
||
<kanban:KanbanColumn Title="To Do" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@VishalOmprasad, as we discussed use kanban instance, and define columns
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Used kanban instance #3575
MAUI/Kanban-Board/Column.md
Outdated
|
||
<kanban:KanbanColumn Title="To Do" | ||
Categories="Open" | ||
Background="AliceBlue"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
MAUI/Kanban-Board/Column.md
Outdated
openColumn.PlaceholderStyle = placeholderStyle; | ||
kanban.Columns.Add(openColumn); | ||
|
||
{% endhighlight %} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add KanbanViewModel
file
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added KanbanViewModel
file #3575
MAUI/Kanban-Board/Column.md
Outdated
|
||
{% endtabs %} | ||
|
||
### NoCardTemplate |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Customize no card appearance using DataTemplate
Use the NoCardTemplate
property of the KanbanColumn
to define a custom UI for columns that have no cards. This allows you to display meaningful text or messages when a column is empty.
The following example shows how to define a custom no card template using a DataTemplate
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Content modified as above - #3575
MAUI/Kanban-Board/Column.md
Outdated
</DataTemplate> | ||
</ContentPage.Resources> | ||
|
||
<kanban:SfKanban x:Name="kanban" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Codes added based on the GIF image #3575
MAUI/Kanban-Board/Column.md
Outdated
|
||
{% tabs %} | ||
|
||
{% highlight xaml %} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code snippet templated used as above and raised new PR - #3575
MAUI/Kanban-Board/Column.md
Outdated
|
||
{% endtabs %} | ||
|
||
### PlaceholderStyle |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Customize the placeholder style
Use the PlaceholderStyle
property of the KanbanColumn
to style the placeholder area where cards can be dropped during drag-and-drop operations. This enhances visual clarity and improves the user experience during interactions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Content modified as above - #3575
MAUI/Kanban-Board/Getting-Started.md
Outdated
@@ -505,7 +509,415 @@ doneColumn.Categories = new List<object>() { "Done" }; | |||
|
|||
{% endtabs %} | |||
|
|||
### Running the Application | |||
## Custom Model mapping |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@VishalOmprasad, follow below title and reference template shared
Populate .NET MAUI Kanban item source
Creating the default model tasks
Reference - https://help.syncfusion.com/maui/scheduler/getting-started#creating-the-scheduler-appointments
Creating the custom model tasks with data mapping
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Followed like the above specified template for title and its contents.
MAUI/Kanban-Board/Getting-Started.md
Outdated
|
||
{% highlight C# %} | ||
|
||
public class KanbanCustomModel : INotifyPropertyChanged |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code snippet template changed as above
MAUI/Kanban-Board/Getting-Started.md
Outdated
} | ||
} | ||
|
||
public string TaskImageURL |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use proper API name to meet C# standards
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Proper API names used in custom model class code snippet
{% endhighlight %} | ||
|
||
{% endtabs %} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add notes:
When using a custom model, the default card UI is not applied. You must define a custom DataTemplate
via the CardTemplate
property to render the card content.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Notes added in Getting Started
Build Status: INPROGRESS 🔃 |
The running CI Job is terminated due to changes committed on the source branch for this Merge Request and CI triggered for latest commit. |
CI Status: ABORTED ❌ |
Build Status: INPROGRESS 🔃 |
CI Status: SUCCESS ✅ |
Build Status: INPROGRESS 🔃 |
Build Status: INPROGRESS 🔃 |
CI Status: SUCCESS ✅ |
Build Status: INPROGRESS 🔃 |
CI Status: SUCCESS ✅ |
Build Status: INPROGRESS 🔃 |
CI Status: SUCCESS ✅ |
Build Status: INPROGRESS 🔃 |
CI Status: SUCCESS ✅ |
Build Status: INPROGRESS 🔃 |
CI Status: SUCCESS ✅ |
Build Status: INPROGRESS 🔃 |
CI Status: SUCCESS ✅ |
…(code snippet modified properly)
Build Status: INPROGRESS 🔃 |
The running CI Job is terminated due to changes committed on the source branch for this Merge Request and CI triggered for latest commit. |
CI Status: ABORTED ❌ |
Build Status: INPROGRESS 🔃 |
CI Status: SUCCESS ✅ |
Description
MAUI Kanban UG document updated regarding custom mapping feature.
For Cards and Column, separate PRs raised
Cards - #3574
Column - #3575