xamarin.forms如何刷新内容视图和内容页面?

Gay*_*ale 7 xamarin.forms

ContentViewCarouselPage.我ConentPage从导航到ContentView.更新ContentPage并返回ContentView.

现在,在这个笔记上,我ContentView没有得到更新.

此外,如果我在输入中更改文本ContentView并转到ContentPage并返回,则我的条目更改将被删除.

那么,是否有任何机制,以便当我回到ContentView它时刷新?

我尝试使用OnAppearing()方法,ContentView但它显示错误ContentView does not contain definition for OnAppearing().

谢谢.:)

Joa*_*m M 0

在里面运行你的代码

Device.BeginInvokeOnMainThread(async () =>
{
   ///Code to update view here
});
Run Code Online (Sandbox Code Playgroud)