public void RefreshAppList(AudioDevice device) { AppReflection newReflection = new AppReflection(); newReflection.FadeInMS = CurrentAudioReflection.FadeInMS; foreach (AudioSession session in AudioSession.RequestAllSessions(device)) { if (session.Process != null) { BitmapSource source = null; if (session.ProcessPath != null) { System.Drawing.Icon icon = System.Drawing.Icon.ExtractAssociatedIcon(session.ProcessPath); source = System.Windows.Interop.Imaging.CreateBitmapSourceFromHIcon( icon.Handle, new Int32Rect(0, 0, icon.Width, icon.Height), BitmapSizeOptions.FromEmptyOptions()); } newReflection.SessionToThumbnail.Add(session, source); } } CurrentAudioReflection = newReflection; PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(nameof(CurrentAudioReflection))); }