protected override void OnDetachingFrom(MainPage bindable) { this.viewModel.Messages.CollectionChanged -= Messages_CollectionChanged; this.sfChat = null; this.viewModel = null; base.OnDetachingFrom(bindable); }
protected override void OnAttachedTo(MainPage bindable) { this.sfChat = bindable.FindByName <SfChat>("sfChat"); this.viewModel = bindable.FindByName <GettingStattedViewModel>("viewModel"); this.viewModel.Messages.CollectionChanged += Messages_CollectionChanged; base.OnAttachedTo(bindable); }