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

            string name = string.Empty;

            NavigationContext.QueryString.TryGetValue("name", out name);
            PageTitle = name.ToUpper();

            DataContext = this;

            string id = string.Empty;

            if (NavigationContext.QueryString.TryGetValue("venueid", out id))
            {
                _id = id;
                var eventing = DataManager.Current.Load <Model.VenueEvents>(new LoadContext(id),
                                                                            (ld) =>
                {
                    Events = ld;
                },
                                                                            (err) =>
                {
                    /*throw new UserIntendedException(
                     *  "We couldn't download information about the place right now, please try again in a little while.",
                     *  err);*/
                });
            }
            else
            {
                throw new InvalidOperationException("No venue ID was specified along with the view model.");
            }
        }
        protected override void OnNavigatedTo(System.Windows.Navigation.NavigationEventArgs e)
        {
            base.OnNavigatedTo(e);

            string name = string.Empty;
            NavigationContext.QueryString.TryGetValue("name", out name);
            PageTitle = name.ToUpper();

            DataContext = this;

            string id = string.Empty;
            if (NavigationContext.QueryString.TryGetValue("venueid", out id))
            {
                _id = id;
                var eventing = DataManager.Current.Load<Model.VenueEvents>(new LoadContext(id),
                    (ld) => 
                    {
                        Events = ld;
                    },
                    (err) =>
                    {
                        /*throw new UserIntendedException(
                            "We couldn't download information about the place right now, please try again in a little while.",
                            err);*/
                    });
            }
            else
            {
                throw new InvalidOperationException("No venue ID was specified along with the view model.");
            }
        }