Data Binding a Custom Cell in Xamarin.Forms ListView
public class App : Application
{
  ListView lv;
  public App()
  {
    lv = new ListView();
    // The root page of your application
    MainPage = new ContentPage
    {
      Content = new StackLayout
      {
        VerticalOptions = LayoutOptions.FillAndExpand,
        Children = {
          lv
        }
      }
    };
    MainPage.Title = "Weather";
    if (Device.OS == TargetPlatform.iOS)
    {
      MainPage.Padding = new Thickness (0, 35, 0, 0);
    }
    DisplayData();
  }
  async void DisplayData()
  {
    var wsa = new Data();
    var weather = await wsa.GetData("Knoxville, TN");
    var cellTemplate = new DataTemplate(typeof(TemperatureCell));
    lv.ItemTemplate = cellTemplate;
    lv.ItemsSource = weather.list;
  }

  protected override void OnStart()
  {        }

  protected override void OnSleep()
  {        }

  protected override void OnResume()
  {        }
}
July 28th, 2015 8:00am

Hi Sir,

This forum is talking about MS Visio that a part of MS office, not Visual Studio, please post the question to VS forum:

https://social.msdn.microsoft.com/Forums/en-US/home?category=vslanguages

The reason why we recommend posting appropriately is you will get the most qualified pool of respondents, and other partners who read the forums regularly can either share their knowledge or learn from your interaction with us. Thank you for your understanding.

Regards,

George Zhao
TechNet Community Support

Free Windows Admin Tool Kit Click here and download it now
July 28th, 2015 11:08pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics