Пример #1
0
 private void OnActualThemeChanged(FrameworkElement sender, object args)
 {
     if (_player != null)
     {
         _player.Seek(ActualTheme != ElementTheme.Dark ? 1 : 0);
         _player.Play(ActualTheme != ElementTheme.Dark);
     }
 }
Пример #2
0
        private async void OnActualThemeChanged(FrameworkElement sender, object args)
        {
            if (_player != null)
            {
                await _player.UpdateColorsAsync(new Dictionary <int, int>
                {
                    { 0xffffff, ActualTheme != ElementTheme.Dark ? 0x000000 : 0xffffff }
                });

                _player.Seek(ActualTheme != ElementTheme.Dark ? 1 : 0);
                _player.Play(ActualTheme != ElementTheme.Dark);
            }
        }