private void LabelFormatted_SizeChanged(object sender, SizeChangedEventArgs e) //костыль { double DesiredWidth = (LabelFormatted.Content.ToString().Length * 1.25 > LabelArtist.Content.ToString().Length) ? LabelFormatted.RenderSize.Width : LabelArtist.Content.ToString().Length * 12; //LabelArtist имеет фиксированный RenderSize.Width для анимации длинных строк Dispatcher.Invoke(() => ProgressBarSong.Width = DesiredWidth); Dispatcher.Invoke(() => ProgressBarSong.UpdateLayout()); }
public SongDownload(ProgressBarSong progressBar) { progressBar1 = progressBar; }
public SongDownloads(ProgressBarSong progressBar) { progressBarSong = progressBar; }