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());
        }
Esempio n. 2
0
 public SongDownload(ProgressBarSong progressBar)
 {
     progressBar1 = progressBar;
 }
Esempio n. 3
0
 public SongDownloads(ProgressBarSong progressBar)
 {
     progressBarSong = progressBar;
 }