0

是否可以使用 appbar 弹出一个 sigin/up 页面(pivot)?是否可以自动填充屏幕(是否有 SystemTray)?

4

1 回答 1

0

有可能的

要在您的主页中打开一个弹出窗口,请使用(页面加载时的示例弹出窗口):

    public MainPage()
    {
        InitializeComponent();

        Loaded += (obj, args) =>
            {
                Popup popup = new Popup()
                {
                    IsOpen = true
                };


                popup.Child = new PivotPage1(this.ActualWidth, this.ActualHeight, this, popup);
            };
    }

在您的 PivotPage 中,创建附加构造函数:

    private PhoneApplicationPage parent = null;
    private IApplicationBar parentAppBar = null;
    private Popup popup = null;

    public PivotPage1(double w, double h, PhoneApplicationPage p, Popup pop) : this()
    {
        Width = w;
        Height = h;
        parent = p;
        popup = pop;

        Loaded += (obj, args) =>
            {
                parentAppBar = parent.ApplicationBar;
                parent.ApplicationBar = this.ApplicationBar;
            };

        Unloaded += (obj, args) =>
            {
                parent.ApplicationBar = parentAppBar;
            };
    }

    private void menuItem3_Click(object sender, EventArgs e)
    {
        popup.IsOpen = false;
    }
于 2012-07-23T11:22:58.813 回答