title: How to accessing Elements in XAML DataTemplate Listview without interacting with it
body: <p>I have a C# Store App and using DataTemplate Selectors to determine which type of Template to use in a ListView Control bound to an Array. Because it is templated, I cannot assign a dynamic x:Name to each ListView Row.</p>
  
  <p>I need to be able to access the listview rows by Index and set the Visibility of them to On or Off. I have tried things like this, but the <code>.ItemContainerGenerator
              .ContainerFromItem(item);</code> return <code>null</code> and I get a Nullable exception every time:</p>
  
  <p><a href="https://stackoverflow.com/questions/16375375/how-do-i-access-a-control-inside-a-xaml-datatemplate/16446670#16446670">How do I access a control inside a XAML DataTemplate?</a></p>
  
  <p>After doing some research, it appears that the above solution only works if I touch or have SelectedItem set. See here</p>
  
  <p><a href="https://stackoverflow.com/questions/3289116/why-does-itemcontainergenerator-return-null">Why does ItemContainerGenerator return null?</a></p>
  
  <p>I need to be able to Call a Method, both on Page load(initial setting) and also on button click and modify certain rows visibility.</p>