绑定有问题。我需要从
绑定Listpublic class DLHY_ADMIN_VIEW
{
public string VyslednaSuma { get; set; }
public List<DLHY> Dlhy { get; set; }
}
进入此
<CollectionView ItemsSource="{Binding DLHY_}" SelectionMode="Multiple" SelectedItem="{Binding VybranyDLH}">
<CollectionView.ItemTemplate>
<DataTemplate>
<Grid BackgroundColor="Aquamarine" ColumnSpacing="0">
<Label Grid.Row="0" Text="{Binding VyslednaSuma}" TextColor="Red" FontAttributes="Bold" Margin="0" Grid.ColumnSpan="5"/>
<Label Grid.Row="1" Grid.Column="0" Text="{Binding KTO}" Margin="0"/>
<Label Grid.Row="1" Grid.Column="1" Text="{Binding KOMU}" Margin="0"/>
<Label Grid.Row="1" Grid.Column="2" Text="{Binding KOĽKO,StringFormat='{0:N}€'}" Margin="0"/>
<Label Grid.Row="1" Grid.Column="3" Text="{Binding KEDY}" Margin="0"/>
<Label Grid.Row="1" Grid.Column="4" Text="{Binding Popis}" Margin="0"/>
</Grid>
</DataTemplate>
</CollectionView.ItemTemplate>
</CollectionView>
“ DLHY”是
[DynamoDBTable("DLHY")]
public class DLHY
{
[DynamoDBHashKey]
public string ID { get; set; }
public string KTO { get; set; }
public string KOMU { get; set; }
public double KOĽKO { get; set; }
public string KEDY { get; set; }
public string Popis { get; set; }
}
“ DLHY_”是public ObservableCollection<DLHY_ADMIN_VIEW> DLHY_ { get; set; }
。
应该怎么做?有可能这样做吗?谢谢您的帮助