-1
I want to popular an Observablecollection to later display when the screen is loaded. Inside my Viewmodel I am setting the data for test, but when I print it has no content.
I run Noticeshow() when the page / Contentpage is loaded.
protected override void OnAppearing()
{
base.OnAppearing();
ChannelViewModel ViewModel = new ChannelViewModel();
ViewModel.NoticeShow();
}
Inside of my Viewmodel
public class Notice
{
public string NoticeMessage { get; set; }
}
private ObservableCollection<Notice> Notices;
public void NoticeShow()
{
Notices = new ObservableCollection<Notice>()
{
new Notice { NoticeMessage = "Teste de mensagem 1" },
new Notice { NoticeMessage = "Teste de mensagem 2" },
new Notice { NoticeMessage = "Teste de mensagem 3" }
};
Console.WriteLine("Console log -> "+Notices);
}
Return of the writeline Console
Console log -> System.Collections.ObjectModel.ObservableCollection`1[iSequi.ViewModels.ChannelViewModel+Notice]
Hello Vinicius Dutra.. I added Bindingcontext direct in Onappearing, as had no effect. 
 protected override void OnAppearing()
 {
 base.OnAppearing();

 ChannelViewModel ViewModel = new ChannelViewModel();
 BindingContext = ViewModel;
 ViewModel.NoticeShow(); 
 }
– RRV
You set the property
public ObservableCollection<Notice> Notices;
how to publish and bindind the view<ListView ItemsSource="{Binding Notices}"> ... </ListView>
follow link with full example https://docs.microsoft.com/pt-br/xamarin/xamarin-forms/user-interface/listview/customizing-cell-appearance#custom-Cells– Vinicius Dutra