小编dot*_*irl的帖子

Xamarin表示Android OnAppearing在PopModalAsync之后不触发

在使用Modal页面的同时调用PopModalAsync之后,是否有解决Android不能触发的问题.这是一个例子:

using System;
using Xamarin.Forms;

namespace XamarinForms
{
    public class OnAppearingBug : ContentPage
    {
        Label label;
        public OnAppearingBug ()
        {
            label = new Label {
                Text = "Page"
            };
            Button button = new Button {
                Text = "PushModal"
            };
            button.Clicked += (sender, e) => Navigation.PushModalAsync (new PopModalBug ());

            Content = new StackLayout {
                Children = { label, button }
            };
        }
        protected override void OnAppearing(){
            label.Text = "OnAppearing";
        }
    }
}

using System;
using Xamarin.Forms;

namespace XamarinForms
{
    public class …
Run Code Online (Sandbox Code Playgroud)

xamarin.android xamarin xamarin.forms

6
推荐指数
2
解决办法
7328
查看次数

标签 统计

xamarin ×1

xamarin.android ×1

xamarin.forms ×1