Skip to content

Commit d0511cf

Browse files
Bugfix: Fix DataTemplate Binding Issue in FloorSite CollectionView (#648)
* Remove missing AOT compilation from project configuration * Fixing incorrect condition * Fixing bug in FloorSite not showing due to incorrect binding.
1 parent ab49f46 commit d0511cf

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

src/Toolkit/Toolkit.Maui/FloorFilter/FloorFilter.DefaultTemplates.cs

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,24 @@ static FloorFilter()
7373
return containingGrid;
7474
});
7575

76-
DefaultSiteDataTemplate = DefaultFacilityDataTemplate;
76+
DefaultSiteDataTemplate = new DataTemplate(() =>
77+
{
78+
Grid containingGrid = new Grid();
79+
containingGrid.SetAppThemeColor(Grid.BackgroundColorProperty, Color.FromArgb("#FFF"), Color.FromArgb("#353535"));
80+
81+
Label textLabel = new Label
82+
{
83+
FontSize = 14,
84+
VerticalTextAlignment = TextAlignment.Center,
85+
Margin = new Thickness(8),
86+
HorizontalOptions = LayoutOptions.Fill
87+
};
88+
textLabel.SetBinding(Label.TextProperty, static (FloorSite site) => site.Name);
89+
textLabel.SetAppThemeColor(Label.TextColorProperty, Color.FromArgb("#6e6e6e"), Color.FromArgb("#fff"));
90+
91+
containingGrid.Children.Add(textLabel);
92+
return containingGrid;
93+
});
7794

7895
DefaultDifferentiatingFacilityDataTemplate = new DataTemplate(() =>
7996
{

0 commit comments

Comments
 (0)