Skip to content

Commit 67c96dc

Browse files
Merge pull request #3647 from syncfusion-content/Kanban-UG-output-images-hotfix
977013-[Hotfix] MAUI Kanban UG output images added
2 parents 7378dd3 + 48ba474 commit 67c96dc

7 files changed

+56
-52
lines changed

MAUI/Kanban-Board/Column.md

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,6 @@ kanban.Columns.Add(new KanbanColumn
342342
});
343343

344344
kanban.ItemsSource = viewModel.Cards;
345-
346345
this.Content = kanban;
347346

348347
{% endhighlight %}
@@ -516,6 +515,8 @@ public class KanbanViewModel
516515
{% endhighlight %}
517516
{% endtabs %}
518517

518+
![column-background-customization-in-maui-kanban](images/column/column-background-customization-in-maui-kanban.png)
519+
519520
### Customize no card appearance using DataTemplate
520521

521522
The .NET MAUI Kanban control allows you to define a custom UI for columns that have no cards using the [`NoCardTemplate`](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.Kanban.KanbanColumn.html#Syncfusion_Maui_Kanban_KanbanColumn_NoCardTemplate) property of the [`KanbanColumn`](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.Kanban.KanbanColumn.html). This feature helps you display meaningful messages or visuals when a column is empty, improving the user experience.
@@ -788,6 +789,8 @@ public class KanbanViewModel
788789
{% endhighlight %}
789790
{% endtabs %}
790791

792+
![no-card-appearance-in-maui-kanban](images/column/no-card-appearance-in-maui-kanban.png)
793+
791794
### Customize the placeholder style
792795

793796
The .NET MAUI Kanban control supports styling the placeholder area, where cards can be dropped during drag-and-drop operations using the [`PlaceholderStyle`](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.Kanban.KanbanColumn.html#Syncfusion_Maui_Kanban_KanbanColumn_PlaceholderStyle) property of the [`KanbanColumn`](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.Kanban.KanbanColumn.html). This customization enhances visual clarity and improves the user experience during interactions.
@@ -800,8 +803,8 @@ The .NET MAUI Kanban control supports styling the placeholder area, where cards
800803
ItemsSource="{Binding Cards}">
801804
<kanban:SfKanban.Resources>
802805
<kanban:KanbanPlaceholderStyle x:Key="PlaceholderStyle"
803-
Background="Transparent"
804-
SelectionIndicatorBackground="Transparent"
806+
Background="#FAC7AD"
807+
SelectionIndicatorBackground="#FAC7AD"
805808
SelectionIndicatorStroke="#914C00">
806809
<kanban:KanbanPlaceholderStyle.SelectionIndicatorTextStyle>
807810
<kanban:KanbanTextStyle TextColor="#914C00" />
@@ -838,12 +841,12 @@ kanban.AutoGenerateColumns = false;
838841

839842
KanbanPlaceholderStyle placeholderStyle = new KanbanPlaceholderStyle
840843
{
841-
Background = Colors.Transparent,
842-
SelectionIndicatorBackground = Colors.Transparent,
843-
SelectionIndicatorStroke = Color.FromArgb("#FFB77F"),
844+
Background = Color.FromArgb("#FAC7AD"),
845+
SelectionIndicatorBackground = Color.FromArgb("#FAC7AD"),
846+
SelectionIndicatorStroke = Color.FromArgb("#914C00"),
844847
SelectionIndicatorTextStyle = new KanbanTextStyle
845848
{
846-
TextColor = Color.FromArgb("#FFB77F")
849+
TextColor = Color.FromArgb("#914C00")
847850
}
848851
};
849852

@@ -944,4 +947,6 @@ public class KanbanViewModel
944947
}
945948

946949
{% endhighlight %}
947-
{% endtabs %}
950+
{% endtabs %}
951+
952+
![placeholder-style-in-maui-kanban](images/column/placeholder-style-in-maui-kanban.png)

MAUI/Kanban-Board/Getting-Started.md

Lines changed: 43 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,7 @@ The following sample code demonstrates this process in action:
344344

345345
<kanban:SfKanban x:Name="kanban"
346346
AutoGenerateColumns="False">
347-
</kanban:SfKanban.BindingContext>
347+
<kanban:SfKanban.BindingContext>
348348
<local:KanbanViewModel />
349349
</kanban:SfKanban.BindingContext>
350350
<kanban:SfKanban.Columns>
@@ -465,6 +465,8 @@ public class KanbanViewModel
465465
{% endhighlight %}
466466
{% endtabs %}
467467

468+
![defining-columns-using-default-modelin-maui-kanban](images/getting-started/defining-columns-using-default-modelin-maui-kanban.png)
469+
468470
### Creating the custom model tasks with data mapping
469471

470472
You can also map a custom data model to the Kanban control. The following steps demonstrate how to render tasks using the [.NET MAUI Kanban](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.Kanban.SfKanban.html) control with corresponding custom data properties.
@@ -484,7 +486,7 @@ Alternatively, you can manually define columns by setting [`AutoGenerateColumns`
484486
Let’s look at the practical code example:
485487

486488
{% tabs %}
487-
{% highlight XAML hl_lines="2 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26" %}
489+
{% highlight XAML hl_lines="2 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24" %}
488490

489491
<kanban:SfKanban ItemsSource="{Binding TaskDetails}"
490492
ColumnMappingPath="Status">
@@ -493,75 +495,70 @@ Let’s look at the practical code example:
493495
</kanban:SfKanban.BindingContext>
494496
<kanban:SfKanban.CardTemplate>
495497
<DataTemplate>
496-
<StackLayout WidthRequest="250"
497-
Orientation="Vertical"
498-
BackgroundColor="Gray"
499-
Padding="10,10,10,10">
500-
<StackLayout Orientation="Horizontal">
498+
<Border Stroke="Black"
499+
StrokeThickness="1"
500+
Background="#F3CFCE">
501+
<VerticalStackLayout Margin="10">
501502
<Label Text="{Binding Title}"
502-
TextColor="Silver"
503-
HorizontalOptions="StartAndExpand" />
504-
</StackLayout>
505-
<StackLayout Orientation="Horizontal">
506-
<Label Text="{Binding Description}"
507-
WidthRequest="150"
508-
FontSize="14"
509-
TextColor="Silver"
510-
LineBreakMode="WordWrap" />
511-
</StackLayout>
512-
</StackLayout>
503+
HorizontalTextAlignment="Center"
504+
FontAttributes="Bold"
505+
FontSize="14" />
506+
<Label Text="{Binding Description}"
507+
HorizontalTextAlignment="Center"
508+
FontSize="12"
509+
LineBreakMode="WordWrap"
510+
Margin="5" />
511+
</VerticalStackLayout>
512+
</Border>
513513
</DataTemplate>
514514
</kanban:SfKanban.CardTemplate>
515515
</kanban:SfKanban>
516516

517517
{% endhighlight %}
518-
{% highlight C# hl_lines="3 4 5 6 7 8 9 10 11 12 14 15 16 17 18 19 21 22 24 25 26 27 29 30 31 32 33 34 35 37 38 40 41 42 43 45 46" %}
518+
{% highlight C# hl_lines="3 4 6 8 9 10 13 15 17 18 19 20 23 25 26 27 28 31 33 34 35 36 39 42 43" %}
519519

520520
SfKanban kanban = new SfKanban();
521521
KanbanViewModel viewModel = new KanbanViewModel();
522522
kanban.ColumnMappingPath = "Status";
523523
kanban.CardTemplate = new DataTemplate(() =>
524524
{
525-
StackLayout stackLayout = new StackLayout()
525+
var titleLabel = new Label
526526
{
527-
WidthRequest = 250,
528-
Orientation = StackOrientation.Vertical,
529-
Padding = new Thickness(10),
530-
BackgroundColor = Colors.Gray
527+
HorizontalTextAlignment = TextAlignment.Center,
528+
FontAttributes = FontAttributes.Bold,
529+
FontSize = 14
531530
};
532531

533-
HorizontalStackLayout titleLayout = new HorizontalStackLayout();
534-
Label title = new Label()
532+
titleLabel.SetBinding(Label.TextProperty, "Title");
533+
534+
var descriptionLabel = new Label
535535
{
536-
TextColor = Colors.Silver,
537-
HorizontalOptions = LayoutOptions.Start
536+
HorizontalTextAlignment = TextAlignment.Center,
537+
FontSize = 12,
538+
LineBreakMode = LineBreakMode.WordWrap,
539+
Margin = new Thickness(5)
538540
};
539541

540-
title.SetBinding(Label.TextProperty, new Binding("Title"));
541-
titleLayout.Children.Add(title);
542+
descriptionLabel.SetBinding(Label.TextProperty, "Description");
542543

543-
StackLayout contentLayout = new StackLayout()
544+
var stackLayout = new VerticalStackLayout
544545
{
545-
Orientation = StackOrientation.Horizontal
546+
Margin = new Thickness(10),
547+
Children = { titleLabel, descriptionLabel }
546548
};
547549

548-
Label description = new Label()
550+
var border = new Border
549551
{
550-
WidthRequest = 150,
551-
FontSize = 14,
552-
TextColor = Colors.Silver,
553-
LineBreakMode = LineBreakMode.WordWrap
552+
Stroke = Colors.Black,
553+
StrokeThickness = 1,
554+
Background = Color.FromArgb("#F3CFCE"),
555+
Content = stackLayout
554556
};
555-
556-
description.SetBinding(Label.TextProperty, new Binding("Description"));
557-
contentLayout.Children.Add(description);
558557

559-
stackLayout.Children.Add(titleLayout);
560-
stackLayout.Children.Add(contentLayout);
561-
return stackLayout;
558+
return border;
562559
});
563560

564-
kanban.ItemsSource = viewModel.Cards;
561+
kanban.ItemsSource = viewModel.TaskDetails;
565562
this.Content = kanban;
566563

567564
{% endhighlight %}
@@ -649,6 +646,8 @@ public class KanbanViewModel
649646
{% endhighlight %}
650647
{% endtabs %}
651648

649+
![defining-columns-using-custom-modelin-maui-kanban](images/getting-started/defining-columns-using-custom-modelin-maui-kanban.png)
650+
652651
N> When using a custom data model, the default card UI is not applicable. You must define a custom `DataTemplate` using the [`CardTemplate`](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.Kanban.SfKanban.html#Syncfusion_Maui_Kanban_SfKanban_CardTemplate) property to render the card content appropriately.
653652

654653
N> [View sample in GitHub](https://github.com/SyncfusionExamples/GettingStarted_Kanban_MAUI)
84.6 KB
Loading
86.7 KB
Loading
86.7 KB
Loading
21.6 KB
Loading
23.9 KB
Loading

0 commit comments

Comments
 (0)