예제 #1
0
        /// <summary>
        /// Retrive the instance of the view model
        /// </summary>
        /// <returns>The current view model</returns>

        public static RealViewModel GetViewModel()
        {
            if (_viewModel == null)
            {
                _viewModel = new RealViewModel();
            }
            return(_viewModel);
        }
        public MainPage()
        {
            //initialize the viewModel.
            this.InitializeComponent();
            viewModel        = RealViewModel.GetViewModel();
            this.DataContext = viewModel;

            //add one instance of the info box
            info = new InfoBox();
            bingMap.Children.Add(info);
            info.Visibility = Visibility.Collapsed;

            //set default view location
            bingMap.SetView(new Location(40.7451934814453, -73.9048461914063), 11.0f);
        }
        public MainPage()
        {
            //initialize the viewModel.
            this.InitializeComponent();
            viewModel = RealViewModel.GetViewModel();
            this.DataContext = viewModel;

            //add one instance of the info box
            info = new InfoBox();
            bingMap.Children.Add(info);
            info.Visibility = Visibility.Collapsed;

            //set default view location
            bingMap.SetView(new Location(40.7451934814453,-73.9048461914063), 11.0f);
        }
예제 #4
0
        /// <summary>
        /// Retrive the instance of the view model
        /// </summary>
        /// <returns>The current view model</returns>

        public static RealViewModel GetViewModel()
        {
            if (_viewModel == null)
            {
                _viewModel = new RealViewModel();
            }
            return _viewModel;
        }