public ListBoxPage() { this.InitializeComponent(); var infos = new TruckInfo[] { new TruckInfo() { ID = "1", Name = "Taco Talent", Style = "Mexican" }, new TruckInfo() { ID = "2", Name = "Cake Shack", Style = "Desserts" }, new TruckInfo() { ID = "3", Name = "Ice Heaven", Style = "Cold Drinks" }, }; var data = new TruckData() { Trucks = infos }; DataContext = data; }
public NotifyPropertyPage() { this.InitializeComponent(); var infos = new TruckInfo[] { new TruckInfo() { ID = "1", Name = "Taco Talent", Style = "Mexican" }, new TruckInfo() { ID = "2", Name = "Cake Shack", Style = "Desserts" }, new TruckInfo() { ID = "3", Name = "Ice Heaven", Style = "Cold Drinks" }, }; var data = new TruckDataNotify() { Trucks = new ObservableCollection <TruckInfo>(infos) }; DataContext = data; }
public DataContext() { this.InitializeComponent(); var info = new TruckInfo() { ID = "1", Name = "Taco Talent", Style = "Mexican" }; DataContext = info; }
public MainPage() { this.InitializeComponent(); var info = new TruckInfo() { ID = "1", Name = "Taco Talent", Style = "Mexican" }; TruckID.Text = info.ID; TruckName.Text = info.Name; TruckStyle.Text = info.Style; }