You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Kanban control provides several properties to customize the background of its columns and placeholders, allowing for clear visual distinction and feedback.
286
-
287
-
The `Background` property of the [`KanbanColumn`](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.Kanban.KanbanColumn.html) sets the background for the entire column. This is useful for visually separating columns and aligning them with a specific status or workflow stage. It accepts a `Brush` and supports `AppThemeBinding`.
288
-
289
-
The `Background` property of `KanbanPlaceholderStyle` sets the background color of the placeholder area that appears when dragging a card over a valid column.
KanbanPlaceholderStyle placeholderStyle = new KanbanPlaceholderStyle
309
-
{
310
-
Background = Colors.Yellow,
311
-
SelectionIndicatorStroke = Colors.Red,
312
-
};
313
-
314
-
KanbanColumn openColumn = new KanbanColumn();
315
-
openColumn.Title = "To Do";
316
-
openColumn.PlaceholderStyle = placeholderStyle;
317
-
kanban.Columns.Add(openColumn);
318
-
319
-
{% endhighlight %}
320
-
321
-
{% endtabs %}
322
-
323
-
### NoCardTemplate
324
-
325
-
The `NoCardTemplate` property allows you to define a custom UI that is displayed when a column has no cards. This is useful for providing visual feedback or instructions when a column is empty.
TextColor = Application.Current.Resources.TryGetValue("ContentForegroundAlt1", out var color) ? (Color)color : Colors.Gray,
404
-
HorizontalOptions = LayoutOptions.Center,
405
-
VerticalOptions = LayoutOptions.Center
406
-
};
407
-
});
408
-
}
409
-
410
-
{% endhighlight %}
411
-
412
-
{% highlight C# tabtitle="ViewModel" %}
413
-
414
-
public class ViewModel
415
-
{
416
-
public ObservableCollection<KanbanModel> Cards { get; set; }
417
-
public ViewModel()
418
-
{
419
-
Cards = new ObservableCollection<KanbanModel>();
420
-
Cards.Add(new KanbanModel()
421
-
{
422
-
ID = 1,
423
-
Title = "iOS - 1002",
424
-
ImageURL = "People_Circle1.png",
425
-
Category = "Open",
426
-
Description = "Analyze customer requirements",
427
-
IndicatorFill = Colors.Red,
428
-
Tags = new List<string> { "Incident", "Customer" }
429
-
});
430
-
Cards.Add(new KanbanModel()
431
-
{
432
-
ID = 6,
433
-
Title = "Xamarin - 4576",
434
-
ImageURL = "People_Circle2.png",
435
-
Category = "Open",
436
-
Description = "Show the retrieved data from the server in grid control",
437
-
IndicatorFill = Colors.Green,
438
-
Tags = new List<string> { "Story", "Customer" }
439
-
});
440
-
Cards.Add(new KanbanModel()
441
-
{
442
-
ID = 13,
443
-
Title = "UWP - 13",
444
-
ImageURL = "People_Circle3.png",
445
-
Category = "In Progress",
446
-
Description = "Add responsive support to application",
447
-
IndicatorFill = Colors.Brown,
448
-
Tags = new List<string> { "Story", "Customer" }
449
-
});
450
-
Cards.Add(new KanbanModel()
451
-
{
452
-
ID = 2543,
453
-
Title = "IOS- 11",
454
-
Category = "Code Review",
455
-
ImageURL = "People_Circle4.png",
456
-
Description = "Check login page validation",
457
-
IndicatorFill = Colors.Brown,
458
-
Tags = new List<string> { "Story", "Customer" }
459
-
});
460
-
Cards.Add(new KanbanModel()
461
-
{
462
-
ID = 123,
463
-
Title = "UWP-21",
464
-
Category = "Done",
465
-
ImageURL = "People_Circle5.png",
466
-
Description = "Check login page validation",
467
-
IndicatorFill = Colors.Brown,
468
-
Tags = new List<string> { "Story", "Customer" }
469
-
});
470
-
}
471
-
472
-
}
473
-
474
-
{% endhighlight %}
475
-
476
-
{% endtabs %}
477
-
478
-
### PlaceholderStyle
479
-
480
-
The `PlaceholderStyle` property is used to style the placeholder area where cards can be dropped during drag-and-drop operations. This helps improve visual clarity during interactions.
0 commit comments