title: Editable ListView wpf
body: <p>I am trying to create editable listview dynamically. Need to display array of string as source. when we are clicking on the item it should be editable. </p>
  
  <p>Problem: No errors but no items are displaying.</p>
  
  <pre><code> Style tableStyle = _resourceDictionary["TableStyle"] as Style;
  
          ItemsPanelTemplate itemsPanelTemplate = _resourceDictionary["ItemsPanelTemplate"] as ItemsPanelTemplate;
  
          FrameworkElementFactory factoryPanel = new FrameworkElementFactory(typeof(UniformGrid));
          factoryPanel.SetValue(UniformGrid.ColumnsProperty, 5);
          ItemsPanelTemplate template = new ItemsPanelTemplate();
          template.VisualTree = factoryPanel;
  
          ListView simpleTable = new ListView();
          //  simpleTable.Columns.Add(new DataGridTextColumn { Header = "Values" });
          simpleTable.Style = tableStyle;
          simpleTable.ItemsPanel = template;
          _table = simpleTable;
  
   string aa = "aa,xx,cc,vv,bbb,hh,gg,rr,tt,yy,uu,ooo";
  _table.ItemsSource = aa.ToString().Split(',');
  </code></pre>
  
  <p>Xaml</p>
  
  <pre><code>&lt;Style x:Key="TableStyle" TargetType="{x:Type ListView}"&gt;
      &lt;Setter Property="Background" Value="{StaticResource ControlBackgroundBrush}"/&gt;
      &lt;Setter Property="Template"&gt;
          &lt;Setter.Value&gt;
              &lt;ControlTemplate TargetType="{x:Type ListView}"&gt;
                  &lt;ListView&gt;
                      &lt;ListView.View&gt;
                          &lt;GridView &gt;
                              &lt;GridViewColumn Header="Databases" Width="498"&gt;
                                  &lt;GridViewColumn.CellTemplate&gt;
                                      &lt;DataTemplate&gt;
                                          &lt;TextBox  Text="{Binding .}" /&gt;
                                      &lt;/DataTemplate&gt;
                                  &lt;/GridViewColumn.CellTemplate&gt;
                              &lt;/GridViewColumn&gt;
                          &lt;/GridView&gt;
                      &lt;/ListView.View&gt;
                  &lt;/ListView&gt;
  
              &lt;/ControlTemplate&gt;
          &lt;/Setter.Value&gt;
      &lt;/Setter&gt;
  &lt;/Style&gt;
  </code></pre>