using StockPortfolio.Common;
using System;
using Windows.System;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Navigation;

namespace StockPortfolio
{
    public partial class AboutPage : Page
    {


        public Visibility HeaderVisbility { get; set; }
     

        
        private NavigationHelper navigationHelper;


        /// <summary>
        /// NavigationHelper is used on each page to aid in navigation and 
        /// process lifetime management
        /// </summary>
        public NavigationHelper NavigationHelper
        {
            get { return this.navigationHelper; }
        }
        public AboutPage()
        {
            InitializeComponent();
            this.navigationHelper = new NavigationHelper(this);
            this.navigationHelper.LoadState += navigationHelper_LoadState;
            //DataContext = ViewModel.Instance;
            
        }

        /// <summary>
        /// Invoked when this page is about to be displayed in a Frame.
        /// </summary>
        /// <param name="e">Event data that describes how this page was reached.
        /// This parameter is typically used to configure the page.</param>
        private async void navigationHelper_LoadState(object sender, LoadStateEventArgs e)
        {
            // TODO: Create an appropriate data model for your problem domain to replace the sample data
          

        }

        protected override void OnNavigatedTo(NavigationEventArgs e)
        {
            this.navigationHelper.OnNavigatedTo(e);
          
        }

        protected override void OnNavigatedFrom(NavigationEventArgs e)
        {
            this.navigationHelper.OnNavigatedFrom(e);
          
        }
        

        private async void HyperlinkButton_Click(object sender, RoutedEventArgs e)
        {
            var hyperlink = (HyperlinkButton)sender;
            await Launcher.LaunchUriAsync(new Uri("https://www.grapecity.com/en/componentone", UriKind.Absolute));
        }
    }
}