using System; using StrixMusic.Sdk.MediaPlayback; using Windows.UI; using Windows.UI.Xaml; using Windows.UI.Xaml.Data; using Windows.UI.Xaml.Media; namespace StrixMusic.Shells.ZuneDesktop.Converters.TrackTable { /// /// Decides the for a ForegroundColor based a playback state. /// public class PlaybackStateToForegroundConverter : IValueConverter { /// public static Brush Convert(PlaybackState playbackState) { switch (playbackState) { case PlaybackState.Playing: return new SolidColorBrush(Color.FromArgb(255, 241, 14, 160)); default: return (SolidColorBrush)Application.Current.Resources["SystemColorWindowTextBrush"]; ; } } /// public object Convert(object value, Type targetType, object parameter, string language) { return Convert((PlaybackState)value); } /// public object ConvertBack(object value, Type targetType, object parameter, string language) { throw new NotImplementedException(); } } }