Exemplo n.º 1
0
        /// Known Colors:
        /// Base          : Base tile color
        /// Highlight     : accent color for various headings
        /// Lowlight      : button press highlight
        /// Muted         : unused?
        /// SecondaryText : controls some (literally) random items such as toggles that are off in settings
        ///                 meeting locations, date received for emails etc.
        /// High Contrast : Tile background when tile has an unread count (such as email, sms, phone etc.)
        public void UpdateColors()
        {
            if (!_inited)
            {
                return;
            }

            //TODO: all of these properties should be of type Color and the XAML should use a Converter
            _themeColor.Base          = BaseColor.Color.ToBandColor();
            _themeColor.Highlight     = HighlightColor.Color.ToBandColor();
            _themeColor.Lowlight      = LowlightColor.Color.ToBandColor();
            _themeColor.Muted         = MutedColor.Color.ToBandColor();
            _themeColor.SecondaryText = SecondaryTextColor.Color.ToBandColor();
            _themeColor.HighContrast  = HighContrastColor.Color.ToBandColor();

            _client.SetDeviceThemeAsync(_themeColor);
        }