Beispiel #1
0
 /// <summary>
 /// Constructor.
 /// </summary>
 public MainPage()
 {
     InitializeComponent();
     DataContext = App.ViewModel;
     Resolver = DeviceProperties.GetInstance();
     Loaded += MainPage_Loaded;
 }
Beispiel #2
0
 /// <summary>
 /// Constructor.
 /// </summary>
 public MainPage()
 {
     InitializeComponent();
     DataContext = App.ViewModel;
     Resolver    = DeviceProperties.GetInstance();
     Loaded     += MainPage_Loaded;
 }
Beispiel #3
0
        /// <summary>
        /// </summary>
        /// <returns>The singleton instance of this class.</returns>
        public static DeviceProperties GetInstance()
        {
            lock (instanceLock)
            {
                if (_instance == null)
                {
                    _instance = new DeviceProperties();
                }
            }

            return(_instance);
        }
Beispiel #4
0
        public PivotPage()
        {
            this.InitializeComponent();

            //this.NavigationCacheMode = NavigationCacheMode.Required;

            this.navigationHelper            = new NavigationHelper(this);
            this.navigationHelper.LoadState += this.NavigationHelper_LoadState;
            this.navigationHelper.SaveState += this.NavigationHelper_SaveState;

            _resourceLoader          = new ResourceLoader();
            DataContext              = App.ViewModel;
            Resolver                 = DeviceProperties.GetInstance();
            Resolver.IsReadyChanged += OnPropertiesResolvedChanged;
            Loaded += OnPageLoaded;
            MyPivot.SelectionChanged += OnPivotSelectionChanged;
        }
        public PivotPage()
        {
            this.InitializeComponent();

            //this.NavigationCacheMode = NavigationCacheMode.Required;

            this.navigationHelper = new NavigationHelper(this);
            this.navigationHelper.LoadState += this.NavigationHelper_LoadState;
            this.navigationHelper.SaveState += this.NavigationHelper_SaveState;

            _resourceLoader = new ResourceLoader();
            DataContext = App.ViewModel;
            Resolver = DeviceProperties.GetInstance();
            Resolver.IsReadyChanged += OnPropertiesResolvedChanged;
            Loaded += OnPageLoaded;
            MyPivot.SelectionChanged += OnPivotSelectionChanged;
        }
		/// <summary>
		/// Gets the instance.
		/// </summary>
		/// <returns>The singleton instance of this class.</returns>
		public static DeviceProperties GetInstance()
		{
			lock (_syncLock)
			{
				if (_instance == null)
				{
					_instance = new DeviceProperties();
				}
			}

			return _instance;
		}