Advertisement
Guest User

Untitled

a guest
Aug 17th, 2017
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.40 KB | None | 0 0
  1. [DataContract]
  2. public partial class Person {
  3. [DataMember]
  4. public virtual string LastName { get; set; }
  5.  
  6. [DataMember]
  7. public virtual string FirstName { get; set; }
  8. }
  9.  
  10. <?xml version="1.0" encoding="UTF-8"?>
  11. <ContentPage
  12. xmlns="http://xamarin.com/schemas/2014/forms"
  13. xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
  14. x:Class="TheApp.APage"
  15. BackgroundColor="#03264A"
  16. Padding="0,0,0,0">
  17. <ContentPage.Content>
  18. <StackLayout
  19. BackgroundColor="Transparent">
  20. <ListView
  21. ItemsSource="{Binding PersonSearchCollection}">
  22. <ListView.ItemTemplate>
  23. <DataTemplate>
  24. <ViewCell>
  25. <Label
  26. Text="{Binding FirstName}" />
  27. </ViewCell>
  28. </DataTemplate>
  29. </ListView.ItemTemplate>
  30. </ListView>
  31. </StackLayout>
  32. </ContentPage.Content>
  33. </ContentPage>
  34.  
  35. namespace TheApp.ViewModels {
  36. public class APagePageViewModel : Helpers.BindableBase {
  37.  
  38. private ObservableCollection<Person> _PersonSearchCollection = new RangeObservableCollection<Person>();
  39.  
  40. public ObservableCollection<Person> PersonSearchCollection {
  41. get { return _PersonSearchCollection; }
  42. set { SetProperty(ref _PersonSearchCollection, value); }
  43. }
  44. }
  45. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement