是否可以使用appbar弹出一个sign / up页面(pivot)?

时间:2012-07-23 06:35:07

标签: windows-phone-7

是否可以使用appbar弹出登录/向上页面(枢轴)?是否可以自动填充屏幕(是否有系统托盘)?

1 个答案:

答案 0 :(得分:0)

可能

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

    public MainPage()
    {
        InitializeComponent();

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


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

在您的数据透视表中,创建添加构造函数:

    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;
    }