title: TaskbarItemInfo does not show Indeterminate ProgressState
body: <p>I have made a simple example of my issue. There is a window having its DataContext bount to MainWindowViewModel class. The window contains a Grid with a Button and a ProgressBar. The Button's command is bount to a ViewModel's RelayCommand that at first executes an increment of an integer property &quot;Percent&quot; from 0 to 100. The progressBar shows the progress just fine! The window contains a TaskBarItemInfo property, and the latter has two properties: a ProgressValue bount to a double property &quot;Count&quot;, and a ProgressState bount to a TaskbarItemProgressState property &quot;State&quot;, all properties in the in the MainWindowViewModel. The TaskbarItemInfo shows also just fine the increment from 0 to 1.</p>
  <p>But in the second part of the initial method the progress becomes indeterminate for 5 seconds. While that shows just fine in the progressBar, it does not in the TaskBar. I have used both a Converter from boolean to TaskbarItemProgressState to the Path of the ProgressState property (IsIndeterminate), and a binding to a separate property State, as shown to the code below.</p>
  <p><strong>MainWindow.xaml</strong></p>
  <pre><code>&lt;Window x:Class=&quot;ProgressState.MainWindow&quot;
          xmlns=&quot;http://schemas.microsoft.com/winfx/2006/xaml/presentation&quot;
          xmlns:x=&quot;http://schemas.microsoft.com/winfx/2006/xaml&quot;
          xmlns:d=&quot;http://schemas.microsoft.com/expression/blend/2008&quot;
          xmlns:mc=&quot;http://schemas.openxmlformats.org/markup-compatibility/2006&quot;
          xmlns:local=&quot;clr-namespace:ProgressState&quot;
          mc:Ignorable=&quot;d&quot;
          Title=&quot;MainWindow&quot; Height=&quot;200&quot; Width=&quot;400&quot;&gt;
      &lt;Window.DataContext&gt;
          &lt;local:MainWindowViewModel/&gt;
      &lt;/Window.DataContext&gt;
  
      &lt;Window.Resources&gt;
          &lt;local:BoolToProgressStateConverter x:Key=&quot;boolToProgressStateConverter&quot;/&gt;
      &lt;/Window.Resources&gt;
      
      &lt;Window.TaskbarItemInfo&gt;
          &lt;TaskbarItemInfo ProgressValue=&quot;{Binding Count, UpdateSourceTrigger=PropertyChanged, Mode=OneWay}&quot;
                           ProgressState=&quot;{Binding State, UpdateSourceTrigger=PropertyChanged, Mode=OneWay}&quot;/&gt;
          &lt;!--ProgressState=&quot;{Binding IsIndeterminate, UpdateSourceTrigger=PropertyChanged, Mode=OneWay, Converter={StaticResource boolToProgressStateConverter}}&quot;--&gt;
      &lt;/Window.TaskbarItemInfo&gt;
      
      &lt;Grid&gt;
          &lt;Grid.RowDefinitions&gt;
              &lt;RowDefinition/&gt;
              &lt;RowDefinition/&gt;
          &lt;/Grid.RowDefinitions&gt;
          &lt;Button Content=&quot;Start progress&quot; Grid.Row=&quot;0&quot; Height=&quot;30&quot; Width=&quot;100&quot;
                  Command=&quot;{Binding Start}&quot; IsEnabled=&quot;{Binding IsEnabled, Mode=OneWay, UpdateSourceTrigger=PropertyChanged}&quot;/&gt;
          &lt;ProgressBar Grid.Row=&quot;1&quot; Height=&quot;20&quot; Margin=&quot;10 0&quot;
                       Value=&quot;{Binding Percent, UpdateSourceTrigger=PropertyChanged, Mode=OneWay}&quot;
                       IsIndeterminate=&quot;{Binding IsIndeterminate, UpdateSourceTrigger=PropertyChanged, Mode=OneWay}&quot;/&gt;
      &lt;/Grid&gt;
  &lt;/Window&gt;
  </code></pre>
  <p><strong>MainWindowViewModel.cs</strong></p>
  <pre><code>using GalaSoft.MvvmLight;
  using GalaSoft.MvvmLight.CommandWpf;
  using System.Threading;
  using System.Threading.Tasks;
  using System.Windows.Shell;
  
  namespace ProgressState
  {
      public class MainWindowViewModel : ViewModelBase
      {
          private double count;
          private bool isIndeterminate;
          private int percent;
          private bool isEnabled = true;
          private TaskbarItemProgressState state;
  
          public RelayCommand Start { get; set; }
  
          public MainWindowViewModel()
          {
              Start = new RelayCommand(OnStart, CanStart);
          }
  
          public TaskbarItemProgressState State
          {
              get
              {
                  if (IsIndeterminate)
                  {
                      state = TaskbarItemProgressState.Indeterminate;
                  }
                  else
                  {
                      state = TaskbarItemProgressState.Normal;
                  }
                  return state; 
              }
          }
  
          public bool IsEnabled
          {
              get
              {
                  return isEnabled; 
              }
              set 
              {
                  if (value != isEnabled)
                  {
                      isEnabled = value;
                      RaisePropertyChanged(nameof(IsEnabled));
                  }
              }
          }
  
  
          public bool IsIndeterminate
          {
              get 
              {
                  return isIndeterminate; 
              }
              set
              {
                  if (value != isIndeterminate)
                  {
                      isIndeterminate = value;
                      RaisePropertyChanged(nameof(IsIndeterminate));
                      RaisePropertyChanged(nameof(State));
                  }
              }
          }
          
  
          public int Percent
          {
              get
              {
                  return percent; 
              }
              set
              {
                  if (value != percent)
                  {
                      percent = value;
                      RaisePropertyChanged(nameof(Percent));
                      RaisePropertyChanged(nameof(Count));
                  }
              }
          }
  
          public double Count
          {
              get 
              {
                  count = Percent / 100d;
                  return count;
              }
          }
  
  
          private bool CanStart()
          {
              return true;
          }
  
          private async void OnStart()
          {
              IsEnabled = false;
              Percent = 0;
              
              await Task.Run(() =&gt;
              {
                  while (Percent != 100)
                  {
                      Thread.Sleep(100);
                      Percent += 2;
                      
                  }
  
                  IsIndeterminate = true;
                  Thread.Sleep(5000);
                  IsIndeterminate = false;
              });
  
              IsEnabled = true;
  
          }
      }
  }
  </code></pre>
  <p><strong>BoolToProgressStateConverter.cs</strong></p>
  <pre><code>using System;
  using System.Globalization;
  using System.Windows.Data;
  using System.Windows.Shell;
  
  namespace ProgressState
  {
      class BoolToProgressStateConverter : IValueConverter
      {
          public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
          {
              if (value is bool boolean)
              {
                  if (boolean == true)
                  {
                      return TaskbarItemProgressState.Indeterminate;
                  }
                  else if (boolean == false)
                  {
                      return TaskbarItemProgressState.Normal;
                  }
                  else
                  {
                      throw new NotImplementedException();
                  }
  
              }
              return TaskbarItemProgressState.Normal;
          }
  
          public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
          {
              throw new NotImplementedException();
          }
      }
  }
  </code></pre>
  <p>Any ideas?</p>