Skip to content

Commit da0c220

Browse files
committed
OxyplotMauiSample: fix another warning
XamlC warning XC0024: Binding might be compiled incorrectly since the x:DataType annotation comes from an outer scope. Make sure you annotate all DataTemplate XAML elements with the correct x:DataType. See https://learn.microsoft.com/dotnet/maui/fundamentals/data-binding/compiled-bindings for more information.
1 parent e2e2d24 commit da0c220

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Source/OxyplotMauiSample/Pages/IssueDemos/IssueDemoPage.xaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@
77
Title="Select demo">
88
<ListView
99
x:Name="list1"
10-
x:DataType="oxyplotMauiSample:DemoInfo"
1110
HorizontalOptions="Fill"
1211
ItemTapped="ListView_OnItemTapped"
1312
VerticalOptions="Fill">
1413
<ListView.ItemTemplate>
15-
<DataTemplate>
16-
<TextCell Detail="{Binding Details}" Text="{Binding Title}" />
14+
<DataTemplate x:DataType="oxyplotMauiSample:DemoInfo">
15+
<TextCell Detail="{Binding Details}"
16+
Text="{Binding Title}"/>
1717
</DataTemplate>
1818
</ListView.ItemTemplate>
1919
</ListView>

0 commit comments

Comments
 (0)