/// <summary> /// Constructor. /// </summary> public MainPage() { InitializeComponent(); DataContext = App.ViewModel; Resolver = DeviceProperties.GetInstance(); Loaded += MainPage_Loaded; }
/// <summary> /// </summary> /// <returns>The singleton instance of this class.</returns> public static DeviceProperties GetInstance() { lock (instanceLock) { if (_instance == null) { _instance = new DeviceProperties(); } } return(_instance); }
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; }