Skip to content

Commit e8f26d7

Browse files
Merge pull request #3593 from syncfusion-content/Kanban-UG-review-correction-dev
977013-[Dev] MAUI Kanban UG content code snippet updated
2 parents 4fdccd3 + 9b44422 commit e8f26d7

File tree

2 files changed

+41
-38
lines changed

2 files changed

+41
-38
lines changed

MAUI/Kanban-Board/Column.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -560,7 +560,7 @@ The following example shows how to define a custom **no card** template using a
560560
</kanban:SfKanban>
561561

562562
{% endhighlight %}
563-
{% highlight C# %}
563+
{% highlight C# hl_lines="19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44" %}
564564

565565
SfKanban kanban = new SfKanban();
566566
KanbanViewModel viewModel = new KanbanViewModel();

MAUI/Kanban-Board/Getting-Started.md

Lines changed: 40 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -529,43 +529,46 @@ Let’s look at the practical code example:
529529
SfKanban kanban = new SfKanban();
530530
KanbanViewModel viewModel = new KanbanViewModel();
531531
kanban.ColumnMappingPath = "Status";
532-
kanban.CardTemplate = new DataTemplate(() =>
533-
{
534-
StackLayout root = new StackLayout()
535-
{
536-
WidthRequest = 250,
537-
Orientation = StackOrientation.Vertical,
538-
Padding = new Thickness(10),
539-
BackgroundColor = Colors.Gray
540-
};
541-
542-
HorizontalStackLayout titleLayout = new HorizontalStackLayout();
543-
Label title = new Label()
544-
{
545-
TextColor = Colors.Silver,
546-
HorizontalOptions = LayoutOptions.Start
547-
};
548-
title.SetBinding(Label.TextProperty, new Binding("Title"));
549-
titleLayout.Children.Add(title);
550-
551-
StackLayout contentLayout = new StackLayout()
552-
{
553-
Orientation = StackOrientation.Horizontal
554-
};
555-
Label desc = new Label()
556-
{
557-
WidthRequest = 150,
558-
FontSize = 14,
559-
TextColor = Colors.Silver,
560-
LineBreakMode = LineBreakMode.WordWrap
561-
};
562-
desc.SetBinding(Label.TextProperty, new Binding("Description"));
563-
contentLayout.Children.Add(desc);
564-
565-
root.Children.Add(titleLayout);
566-
root.Children.Add(contentLayout);
567-
return root;
568-
});
532+
kanban.CardTemplate = new DataTemplate(() =>
533+
{
534+
StackLayout stackLayout = new StackLayout()
535+
{
536+
WidthRequest = 250,
537+
Orientation = StackOrientation.Vertical,
538+
Padding = new Thickness(10),
539+
BackgroundColor = Colors.Gray
540+
};
541+
542+
HorizontalStackLayout titleLayout = new HorizontalStackLayout();
543+
Label title = new Label()
544+
{
545+
TextColor = Colors.Silver,
546+
HorizontalOptions = LayoutOptions.Start
547+
};
548+
549+
title.SetBinding(Label.TextProperty, new Binding("Title"));
550+
titleLayout.Children.Add(title);
551+
552+
StackLayout contentLayout = new StackLayout()
553+
{
554+
Orientation = StackOrientation.Horizontal
555+
};
556+
557+
Label description = new Label()
558+
{
559+
WidthRequest = 150,
560+
FontSize = 14,
561+
TextColor = Colors.Silver,
562+
LineBreakMode = LineBreakMode.WordWrap
563+
};
564+
565+
description.SetBinding(Label.TextProperty, new Binding("Description"));
566+
contentLayout.Children.Add(description);
567+
568+
stackLayout.Children.Add(titleLayout);
569+
stackLayout.Children.Add(contentLayout);
570+
return stackLayout;
571+
});
569572

570573
kanban.ItemsSource = viewModel.Cards;
571574
this.Content = kanban;

0 commit comments

Comments
 (0)