示例#1
0
        public static UIElement ConvertPageToUIElement(this Page page, PhoneApplicationPage applicationPage)
        {
            var application = new DefaultApplication();

            application.MainPage = page;
            var result = new Platform.WinPhone.Platform(applicationPage);

            result.SetPage(page);
            return(result.GetCanvas());
        }
        void SetMainPage()
        {
            if (_platform == null)
            {
                _platform = new Platform(this);
            }

            _platform.SetPage(_application.MainPage);

            if (!ReferenceEquals(Content, _platform))
            {
                Content = _platform.GetCanvas();
            }
        }