Example #1
0
        public async Task InitAsync()
        {
            // NEEDS BT VERIFICATION IF THIS STILL HAPPENS: check if there is a MeTile to grab (otherwise you get an exception
            // that will also kill the BT connection for daring to read to far beyond the Stream)
            // Need to find a workaround, since this is not exposed in the new lib: var tileId = _client.GetMeTileId();

            BandImage meTileImage = null;

            try
            {
                meTileImage = await _client.PersonalizationManager.GetMeTileImageAsync();
            }
            catch (InvalidOperationException)
            { } // no background image

            if (meTileImage != null)
                _background = meTileImage.ToWriteableBitmap();

            _themeColor = await _client.PersonalizationManager.GetThemeAsync();

            SetColorProperties();

            // Notify that all properties have changed
            NotifyPropertyChanged(null);

            _inited = true;
        }