Example #1
0
        protected override void OnNavigatedTo(System.Windows.Navigation.NavigationEventArgs e)
        {
            base.OnNavigatedTo(e);

            string par = "";

            if (NavigationContext.QueryString.TryGetValue("par", out par))
            {
                userName = par;
                UserLogger userLogger = new UserLogger(userName);
                DataContext = userLogger;
            }
        }
        protected override void OnNavigatedTo(System.Windows.Navigation.NavigationEventArgs e)
        {
            base.OnNavigatedTo(e);

            string par = "";

            if (NavigationContext.QueryString.TryGetValue("par", out par))
            {
                userName = par;
                UserLogger userLogger = new UserLogger(userName);
                DataContext = userLogger;
            }
        }
Example #3
0
        protected override void OnNavigatedTo(System.Windows.Navigation.NavigationEventArgs e)
        {
            base.OnNavigatedTo(e);

            string par = "";
            string valueToParse = "";
            string[] parsedValues;

            if (NavigationContext.QueryString.TryGetValue("par", out par))
            {
                valueToParse = par;
                parsedValues = valueToParse.Split('_');
                userName = parsedValues[0];
                userId = Int32.Parse(parsedValues[1]);
                UserLogger userLogger = new UserLogger(userName, userId);
                DataContext = userLogger;
            }
        }