This question is locked. New answers and comments are not allowed.
I have two pages in my app:
- a MainPage.xaml, where I take some input from the user and navigate to ChooseTime.xaml.
- ChooseTime.xaml, where I display a ListPicker.
In ChooseTime.xaml, I have a StackPanel whose visibility I set to Collapsed (in xaml, as well as override the OnNavigatedTo). I have the ListPicker's SelectionChanged event hooked up to change the StackPanel's visibility to Visible. Basically, i want the user to arrive on the page to see nothing but the ListPicker. Once the user taps on an item on the list, I want more options aka the StackPanel to be visible.
This isn't happening, presumably because from here, "RadListPicker selects the first item when a new data source is set and this behavior is by design". Can someone please explain how I can fix this with a code sample? Here's my code:
EDIT: Title of post should read "Cannot unsubscribe from RadListPicker SelectionChanged event"
- a MainPage.xaml, where I take some input from the user and navigate to ChooseTime.xaml.
- ChooseTime.xaml, where I display a ListPicker.
In ChooseTime.xaml, I have a StackPanel whose visibility I set to Collapsed (in xaml, as well as override the OnNavigatedTo). I have the ListPicker's SelectionChanged event hooked up to change the StackPanel's visibility to Visible. Basically, i want the user to arrive on the page to see nothing but the ListPicker. Once the user taps on an item on the list, I want more options aka the StackPanel to be visible.
This isn't happening, presumably because from here, "RadListPicker selects the first item when a new data source is set and this behavior is by design". Can someone please explain how I can fix this with a code sample? Here's my code:
<
Grid
x:Name
=
"ContentPanel"
Grid.Row
=
"1"
Margin
=
"0,0,12,0"
>
<
StackPanel
x:Name
=
"TimePicker"
Margin
=
"0, 0,0,17"
Width
=
"422"
>
<
TextBlock
x:Name
=
"NoResults"
Text
=
""
Grid.Column
=
"1"
Margin
=
"10, 0, 0, 0"
TextWrapping
=
"Wrap"
/>
<
Controls:RadListPicker
x:Name
=
"radListPicker"
IsEnabled
=
"False"
Visibility
=
"Collapsed"
InlineModeThreshold
=
"6"
SelectionChanged
=
"radListPicker_SelectionChanged"
/>
<
StackPanel
x:Name
=
"CreateNotifications"
Margin
=
"0, 0,0,17"
Width
=
"422"
Visibility
=
"Collapsed"
>
More options here...
</
StackPanel
>
</
StackPanel
>
</
Grid
>
private
void
radListPicker_SelectionChanged(
object
sender, SelectionChangedEventArgs e)
{
CreateNotifications.Visibility = System.Windows.Visibility.Visible;
}
EDIT: Title of post should read "Cannot unsubscribe from RadListPicker SelectionChanged event"