title: ObservableCollection don't modify view
body: <p>I have strange WPF ObservableCollection behavior. By unclear reason when collection modified and there is another condition in getter-method in some property of my class, it does't modify View. Although CollectionChanged event was invoked! 
  Without condition in getter method collection works good.</p>
  
  <p>Too complicated and long-winded to explain here what I do in my work project. Therefore I make small simplify project and emulate same behavior. This project show you problem better then thousand words. </p>
  
  <p>To see the problem - launch project as it is, looks how it works. It is really simple, 2 radiobuttons, datagrid and nothing else. Then go to the MainWindowViewModel, GridItems-property, uncomment commented code and launch project again. See the difference. When collection modify, get-method of GridItems-property dont't invoke (I check it with debugger). How not invoked method can make affect on something??? I don't have any idea on it. Help plz.</p>
  
  <p>Project link:
  <a href="http://www.megafileupload.com/en/file/443850/ObservableCollection-zip.html" rel="nofollow">http://www.megafileupload.com/en/file/443850/ObservableCollection-zip.html</a></p>
  
  <pre><code>class MainWindowViewModel : ViewModelBase
      {
          private ObservableCollection&lt;GridItem&gt;  _totalStorage;
  
          private ObservableCollection&lt;GridItem&gt; _gridItems;
          public ObservableCollection&lt;GridItem&gt; GridItems
          {
              get
              {
                  //if (_gridItems.Count == 0)
                  //{
                  //    return _totalStorage;
                  //}
                  return _gridItems;
              }
              set
              {
                  _gridItems = value;
                  RaisePropertyChanged("GridItems");
              }
          }
  
          public MainWindowViewModel()
          {
              _totalStorage = new ObservableCollection&lt;GridItem&gt;();
              _gridItems = new ObservableCollection&lt;GridItem&gt;();
  
              GridItemsInit();
              _gridItems.CollectionChanged += CollectionChanged;
          }
  
          /// &lt;summary&gt;
          /// Collection change event handler
          /// &lt;/summary&gt;
          /// &lt;param name="o"&gt;&lt;/param&gt;
          /// &lt;param name="e"&gt;&lt;/param&gt;
          private void CollectionChanged(object o, NotifyCollectionChangedEventArgs e)
          {
  
          }
  
  
          private void GridItemsInit()
          {
              _totalStorage.Add(new GridItem
              {
                  Name = "Igor",
                  LastName = "Balachtin",
                  FilerField = FileStatusEnum.All
              });
  
              _totalStorage.Add(new GridItem
              {
                  Name = "Misha",
                  LastName = "Ivanov",
                  FilerField = FileStatusEnum.All
              });
  
              _totalStorage.Add(new GridItem
              {
                  Name = "Ahmed",
                  LastName = "Magamed",
                  FilerField = FileStatusEnum.All
              });
  
              _totalStorage.Add(new GridItem
              {
                  Name = "abrek",
                  LastName = "cheburek",
                  FilerField = FileStatusEnum.All
              });
  
              _totalStorage.Add(new GridItem
              {
                  Name = "Irka",
                  LastName = "Dirka",
                  FilerField = FileStatusEnum.All
              });
          }
  
          private void RefreshGridSource(string statusParam)
          {
              _gridItems.Clear();
  
              //Если нажали на баттон new
              if (statusParam.Equals(FileStatusEnum.All.ToString()))
              {
                  foreach (var item in _totalStorage)
                  {
                      _gridItems.Add(item);
                  }
              }
  
              //Если нажали на archived
              else if (statusParam.Equals(FileStatusEnum.Filtered.ToString()))
              {
                  foreach (var item in _totalStorage.Where(g =&gt; g.FilerField == FileStatusEnum.Filtered))
                  {
                      _gridItems.Add(item);
                  }    
              }
          }
  
  
          private RelayCommand&lt;object&gt; _radioCommand;
  
          public RelayCommand&lt;object&gt; RadioCommand
          {
              get { return _radioCommand ?? (_radioCommand = new RelayCommand&lt;object&gt;(HandlerFileRadio)); }
          }
  
          private void HandlerFileRadio(object obj)
          {
              if (obj == null)
                  return;
  
              var statusParam = obj.ToString();
  
              RefreshGridSource(statusParam);
          }
  
      }
  
  
  Look at this sample.
  //if (_gridItems.Count == 0)
  //{
  //    return _totalStorage;
  //}
  
  Model:
  
   public enum FileStatusEnum
      {
          All = 0,
          Filtered
      }
  
      public class GridItem
      {
          public String Name { get; set; }
          public String LastName { get; set; }
  
          public FileStatusEnum FilerField
          {
              get; set;
          }
      }
  </code></pre>
  
  <p>Xaml:</p>
  
  <pre><code>&lt;Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch"&gt;
          &lt;Grid.ColumnDefinitions&gt;
              &lt;ColumnDefinition Width="*"&gt;&lt;/ColumnDefinition&gt;
              &lt;ColumnDefinition Width="3*"&gt;&lt;/ColumnDefinition&gt;
          &lt;/Grid.ColumnDefinitions&gt;
          &lt;StackPanel Grid.Column="0"&gt;
              &lt;RadioButton Margin="5" IsChecked="True" Command="{Binding RadioCommand}"
                                       CommandParameter="All"&gt;All&lt;/RadioButton&gt;
              &lt;RadioButton Margin="5" Command="{Binding RadioCommand}"
                                       CommandParameter="Filtered"&gt;Filtered&lt;/RadioButton&gt;
          &lt;/StackPanel&gt;
          &lt;DataGrid Grid.Column="1" ItemsSource="{Binding GridItems}" CanUserAddRows="False" AutoGenerateColumns="False"&gt;
              &lt;DataGrid.Columns&gt;
                  &lt;DataGridTextColumn Header="Name" Binding="{Binding Name}" IsReadOnly="True" /&gt;
                  &lt;DataGridTextColumn Header="LastName" Binding="{Binding LastName}" IsReadOnly="True" /&gt;
              &lt;/DataGrid.Columns&gt;
          &lt;/DataGrid&gt;
      &lt;/Grid&gt;
  </code></pre>
  
  <p>really better post all code here instead of link? :/</p>