Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [DataContract]
- public partial class Person {
- [DataMember]
- public virtual string LastName { get; set; }
- [DataMember]
- public virtual string FirstName { get; set; }
- }
- <?xml version="1.0" encoding="UTF-8"?>
- <ContentPage
- xmlns="http://xamarin.com/schemas/2014/forms"
- xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
- x:Class="TheApp.APage"
- BackgroundColor="#03264A"
- Padding="0,0,0,0">
- <ContentPage.Content>
- <StackLayout
- BackgroundColor="Transparent">
- <ListView
- ItemsSource="{Binding PersonSearchCollection}">
- <ListView.ItemTemplate>
- <DataTemplate>
- <ViewCell>
- <Label
- Text="{Binding FirstName}" />
- </ViewCell>
- </DataTemplate>
- </ListView.ItemTemplate>
- </ListView>
- </StackLayout>
- </ContentPage.Content>
- </ContentPage>
- namespace TheApp.ViewModels {
- public class APagePageViewModel : Helpers.BindableBase {
- private ObservableCollection<Person> _PersonSearchCollection = new RangeObservableCollection<Person>();
- public ObservableCollection<Person> PersonSearchCollection {
- get { return _PersonSearchCollection; }
- set { SetProperty(ref _PersonSearchCollection, value); }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement