Created a Hub App in WP8.1, I have a ListView that i need to modify the selection mode when the appbar button is pressed. I cannot access the x:Name given to the listview in the .cs code behind. I have had this working on a normal page, just not working in the Hub App.
I cant access the x:Name="WeatherListView" in the c# to change the selectionmode
<Grid x:Name="LayoutRoot">
<!--TODO: Content should be placed within the following grid-->
<Grid Grid.Row="0" x:Name="ContentRoot" Margin="19,9.5,19,0">
<Hub x:Name="AHubView" x:Uid="Hub" Header="A View" SectionsInViewChanged="AHubVieww_SectionsInViewChanged" >
<!--Background="{ThemeResource HubBackgroundImageBrush}"-->
<HubSection Name="WeatherHub" x:Uid="WeatherHub" Header="Weather Hub" DataContext="{Binding HubData}"
d:DataContext="{Binding}"
>
<DataTemplate >
<ListView
x:Name="WeatherListView"
SelectionMode="Multiple"
ItemClick="WeatherListView_OnItemClick"
ItemsSource="{Binding DataVal}">
<ListView.ItemTemplate>
<DataTemplate>
<StackPanel>
private void WeatherRemoveAppBarButton_OnClick(object sender, RoutedEventArgs e) {
SetDefaultWeatherButton(false);
SetWeatherDeleteButton(true);
}