Ejemplo n.º 1
0
        public void ShowOrHideHomepageClick(object obj)
        {
            //if (IsHomepageContainerVisible != Visibility.Visible)
            //{
            //    IsHomepageContainerVisible = Visibility.Visible;
            //}
            //else
            //{
            //    var startPage = this.Model.PBData.GetPrivateSetting(DefaultProperties.Settings_StartPageUrl);
            //    if (!string.IsNullOrWhiteSpace(startPage))
            //    {
            //        SearchBar.Address = startPage;
            //        SearchBar.Navigate();
            //    }
            //    else
            //    {
            //        IsHomepageContainerVisible = Visibility.Visible;
            //    }

            //}
            var startPage = this.Model.PBData.GetPrivateSetting(DefaultProperties.Settings_StartPageUrl);

            if (!string.IsNullOrWhiteSpace(startPage))
            {
                SearchBar.Address = startPage;
                SearchBar.Navigate();
            }
            else
            {
                this.WebBrowser.Navigate("about:blank");

                SearchBar.Address          = null;
                SearchBar.Title            = (string)System.Windows.Application.Current.FindResource(NewTabMessage);
                SearchBar.SiteImage        = null;
                IsHomepageContainerVisible = Visibility.Visible;
            }
        }