Greetings all
Recently I dipped my finger in dotnet maui and C# for first time. So I run intro some issues. I am trying to follow MVVM model and make a collectionview that contains Labels and Pickers. The labels update as expected but the picker does not, it is empty.
any suggestions?
Recently I dipped my finger in dotnet maui and C# for first time. So I run intro some issues. I am trying to follow MVVM model and make a collectionview that contains Labels and Pickers. The labels update as expected but the picker does not, it is empty.
C#:
<CollectionView BackgroundColor="IndianRed"
Grid.ColumnSpan="3"
Grid.Row="1"
SelectionMode="None"
ItemsSource="{Binding TestsObservableCollection}">
<CollectionView.ItemTemplate>
<DataTemplate x:DataType="model:TestModelClass">
<Grid Padding="10">
<Frame HeightRequest="125">
<Grid Padding="1" ColumnDefinitions="*, 120">
<VerticalStackLayout Grid.Column="0"
Padding="1" Spacing="1"
VerticalOptions="FillAndExpand">
<HorizontalStackLayout Spacing="3">
<Label Text="Test:">
</Label>
<Label Text="{Binding Name}">
</Label>
</HorizontalStackLayout>
<HorizontalStackLayout Spacing="3">
<Label Text="Location of test object:">
</Label>
<Label Text="{Binding Location}">
</Label>
</HorizontalStackLayout>
<HorizontalStackLayout Spacing="3">
<Label Text="Analog Value of test item:">
</Label>
<Label Text="{Binding Value}">
</Label>
</HorizontalStackLayout>
</VerticalStackLayout>
<Picker
x:Name="testResultPicker"
Grid.Row="0"
Grid.Column="2"
Title="Test Status"
BackgroundColor="IndianRed"
ItemDisplayBinding="{Binding Result}">
</Picker>
</Grid>
</Frame>
</Grid>
</DataTemplate>
</CollectionView.ItemTemplate>
</CollectionView>
any suggestions?