title: Access inner element of Hub Scection in Windows store app?
body: <p>How can i set ListView itemSource in C# code behind? Elements inside Hun Sections are not accessible by name.</p>
  
  <pre><code>&lt;Hub x:Name="RootHub" SectionHeaderClick="Hub_SectionHeaderClick"&gt;
          &lt;Hub.Header&gt;
              &lt;!-- Back button and page title --&gt;
              &lt;Grid&gt;
                  &lt;Grid.ColumnDefinitions&gt;
                      &lt;ColumnDefinition Width="80"/&gt;
                      &lt;ColumnDefinition Width="*"/&gt;
                  &lt;/Grid.ColumnDefinitions&gt;
                  &lt;Button  x:Name="backButton" Style="{StaticResource NavigationBackButtonNormalStyle}"
                      Margin="0,0,39,0" 
                      VerticalAlignment="Top"
                      Command="{Binding NavigationHelper.GoBackCommand, ElementName=pageRoot}"
                      AutomationProperties.Name="Back"
                      AutomationProperties.AutomationId="BackButton"
                      AutomationProperties.ItemType="Navigation Button"/&gt;
                  &lt;TextBlock x:Name="pageTitle" Text="{StaticResource AppName}" Style="{StaticResource HeaderTextBlockStyle}" Grid.Column="1" 
                      VerticalAlignment="Top" IsHitTestVisible="false" TextWrapping="NoWrap" /&gt;
              &lt;/Grid&gt;
          &lt;/Hub.Header&gt;
          &lt;HubSection Width="500" x:Name="OperationSection" Header="Operation"&gt;
              &lt;DataTemplate&gt;
                  &lt;Grid Height="535"&gt;
                      &lt;Grid.RowDefinitions&gt;
                          &lt;RowDefinition Height="Auto" /&gt;
                          &lt;RowDefinition Height="Auto" MinHeight="92" /&gt;
                          &lt;RowDefinition /&gt;
                      &lt;/Grid.RowDefinitions&gt;
                      &lt;SearchBox Margin="0,0,50,394"/&gt;
                      &lt;Image Source="Images/plus.png" Margin="375,6,4,394"/&gt;
                      &lt;ListView x:Name="OperationListView" ItemsSource="{Binding Operation}" HorizontalAlignment="Left" Height="453" VerticalAlignment="Top" Width="410" Margin="6,72,0,0" Grid.RowSpan="2"&gt;
                          &lt;!--&lt;ListView.ItemTemplate&gt;
                              &lt;DataTemplate&gt;
                                  &lt;TextBlock x:Name="DataItem" Text="{Binding opId}" /&gt;
  
                              &lt;/DataTemplate&gt;
                          &lt;/ListView.ItemTemplate&gt;--&gt;
                          &lt;ListBoxItem&gt;
                          &lt;StackPanel Orientation="Vertical"&gt;
                              &lt;TextBlock Text="OP : 0001" Width="auto" Height="30" FontSize="20"&gt;&lt;/TextBlock&gt;
                                  &lt;TextBlock Text="Replace Transformer" Width="auto" Height="30" FontSize="20"&gt;&lt;/TextBlock&gt;
                          &lt;/StackPanel&gt;
                          &lt;/ListBoxItem&gt;
                          &lt;ListBoxItem&gt;
                          &lt;StackPanel Orientation="Vertical"&gt;
                                  &lt;TextBlock Text="OP : 0002" Width="auto" Height="30" FontSize="20"&gt;&lt;/TextBlock&gt;
                                  &lt;TextBlock Text="Install New Pole" Width="auto" Height="30" FontSize="20"&gt;&lt;/TextBlock&gt;
                          &lt;/StackPanel&gt;
                          &lt;/ListBoxItem&gt;
                          &lt;ListViewItem&gt;
                          &lt;StackPanel Orientation="Vertical"&gt;
                                  &lt;TextBlock Text="OP : 0003" Width="auto" Height="30" FontSize="20"&gt;&lt;/TextBlock&gt;
                                  &lt;TextBlock Text="Check Equipments" Width="auto" Height="30" FontSize="20"&gt;&lt;/TextBlock&gt;
                          &lt;/StackPanel&gt;
                          &lt;/ListViewItem&gt;
                      &lt;/ListView&gt;
                  &lt;/Grid&gt;
              &lt;/DataTemplate&gt;
          &lt;/HubSection&gt;
          &lt;HubSection Width="500" x:Name="ComponentSection" Header="Component"&gt;
              &lt;DataTemplate&gt;
                  &lt;Grid Height="535"&gt;
                      &lt;Grid.RowDefinitions&gt;
                          &lt;RowDefinition Height="Auto" /&gt;
                          &lt;RowDefinition Height="Auto" MinHeight="92" /&gt;
                          &lt;RowDefinition /&gt;
                      &lt;/Grid.RowDefinitions&gt;
                      &lt;SearchBox Margin="0,0,50,394"/&gt;
                      &lt;Image Source="Images/plus.png" Margin="375,6,4,394"/&gt;
                      &lt;ListView x:Name="OperationListView" ItemsSource="{Binding Operation}" HorizontalAlignment="Left" Height="453" VerticalAlignment="Top" Width="410" Margin="6,72,0,0" Grid.RowSpan="2"&gt;
                      &lt;ListBoxItem&gt;
                              &lt;StackPanel Orientation="Vertical"&gt;
                                  &lt;TextBlock Text="COM : 0001" Width="auto" Height="30" FontSize="20"/&gt;
                                  &lt;TextBlock Text="Transformer" Width="auto" Height="30" FontSize="20"/&gt;
                              &lt;/StackPanel&gt;
                          &lt;/ListBoxItem&gt;
                          &lt;ListBoxItem&gt;
                              &lt;StackPanel Orientation="Vertical"&gt;
                                  &lt;TextBlock Text="COM : 0002" Width="auto" Height="30" FontSize="20"/&gt;
                                  &lt;TextBlock Text="Pole" Width="auto" Height="30" FontSize="20"/&gt;
                              &lt;/StackPanel&gt;
                          &lt;/ListBoxItem&gt;
                          &lt;ListViewItem&gt;
                              &lt;StackPanel Orientation="Vertical"&gt;
                                  &lt;TextBlock Text="COM : 0003" Width="auto" Height="30" FontSize="20"/&gt;
                                  &lt;TextBlock Text="Grid" Width="auto" Height="30" FontSize="20"/&gt;
                              &lt;/StackPanel&gt;
                          &lt;/ListViewItem&gt;
                      &lt;/ListView&gt;
                  &lt;/Grid&gt;
              &lt;/DataTemplate&gt;
          &lt;/HubSection&gt;
          &lt;HubSection Width="500" x:Name="EquipmentSection" Header="Equipment"&gt;
              &lt;DataTemplate&gt;
                  &lt;Grid Height="535"&gt;
                      &lt;Grid.RowDefinitions&gt;
                          &lt;RowDefinition Height="Auto" /&gt;
                          &lt;RowDefinition Height="Auto" MinHeight="92" /&gt;
                          &lt;RowDefinition /&gt;
                      &lt;/Grid.RowDefinitions&gt;
                      &lt;SearchBox Margin="0,0,50,394"/&gt;
                      &lt;Image Source="Images/plus.png" Margin="375,6,4,394"/&gt;
                      &lt;ListView x:Name="OperationListView" ItemsSource="{Binding Operation}" HorizontalAlignment="Left" Height="453" VerticalAlignment="Top" Width="410" Margin="6,72,0,0" Grid.RowSpan="2"&gt;
                        &lt;ListBoxItem&gt;
                              &lt;StackPanel Orientation="Vertical"&gt;
                                  &lt;TextBlock Text="EQ : 0001" Width="auto" Height="30" FontSize="20"/&gt;
                                  &lt;TextBlock Text="Transformer" Width="auto" Height="30" FontSize="20"/&gt;
                              &lt;/StackPanel&gt;
                          &lt;/ListBoxItem&gt;
                          &lt;ListBoxItem&gt;
                              &lt;StackPanel Orientation="Vertical"&gt;
                                  &lt;TextBlock Text="EQ : 0002" Width="auto" Height="30" FontSize="20"/&gt;
                                  &lt;TextBlock Text="Pole" Width="auto" Height="30" FontSize="20"/&gt;
                              &lt;/StackPanel&gt;
                          &lt;/ListBoxItem&gt;
                          &lt;ListViewItem&gt;
                              &lt;StackPanel Orientation="Vertical"&gt;
                                  &lt;TextBlock Text="EQ : 0003" Width="auto" Height="30" FontSize="20"/&gt;
                                  &lt;TextBlock Text="Wire" Width="auto" Height="30" FontSize="20"/&gt;
                              &lt;/StackPanel&gt;
                          &lt;/ListViewItem&gt;
                      &lt;/ListView&gt;
                  &lt;/Grid&gt;
              &lt;/DataTemplate&gt;
          &lt;/HubSection&gt;
      &lt;/Hub&gt;
  </code></pre>
  
  <p>Here i have hard coded list items in OperationListView. But i want to load items dynamically in C#. How could i solve this?
  Thanks in advance.</p>