title: Josh smith MVVM Pattern Big problem
body: <p>I'm create project using Josh Smith <a href="http://msdn.microsoft.com/en-us/magazine/dd419663.aspx" rel="nofollow">THE MODEL-VIEW-VIEWMODEL (MVVM) DESIGN PATTER FOR WPF</a></p>
  
  <p>But has one problem. Same workspace shown same operation. My <code>VIEW</code> contains tabcontrol. after creating 2 or more same workspace,when i changing selected index for tabcontrol from any workspace, other same workspace tabcontrol shown same result. </p>
  
  <p>I'm tested on the Josh smith sample project. But same as my project. If you want to show. download Josh smith code from <a href="http://code.msdn.microsoft.com/mag200902MVVM" rel="nofollow">here</a> and on the MainWindowViewModel.cs changing following code from</p>
  
  <pre><code>void ShowAllCustomers()
          {
              AllCustomersViewModel workspace = null;
                  this.Workspaces.FirstOrDefault(vm =&gt; vm is AllCustomersViewModel)
                  as AllCustomersViewModel;
  
              if (workspace == null)
              {
                  workspace = new AllCustomersViewModel(_customerRepository);
                  this.Workspaces.Add(workspace);
              }
  
              this.SetActiveWorkspace(workspace);
          }
  </code></pre>
  
  <p>To</p>
  
  <pre><code>void ShowAllCustomers()
          {
              AllCustomersViewModel workspace = null;
  
              workspace = new AllCustomersViewModel(_customerRepository);
              this.Workspaces.Add(workspace);            
  
              this.SetActiveWorkspace(workspace);
          }
  </code></pre>
  
  <p>Then Run Code and Open 2 or more <code>All Customer view</code> and changing List view Column order. All opened <code>all customer view</code> shown same result</p>
  
  <p>How to fix this problem</p>