listpicker

WP8 ListPicker Bind

那年仲夏 提交于 2020-01-14 03:59:08
问题 When I bind my data via item source to my ListPicker : C#: var sightingTypes = SightingTypes.List; sightingTypesPicker.ItemsSource = sightingTypes; XML: <toolkit:ListPicker x:Name="sightingTypesPicker" ItemsSource="{Binding sightingTypes, ElementName=this}"> <toolkit:ListPicker.ItemTemplate> <DataTemplate> <StackPanel> <TextBlock Text="{Binding Name}" FontSize="{StaticResource PhoneFontSizeSmall}"/> </StackPanel> </DataTemplate> </toolkit:ListPicker.ItemTemplate> </toolkit:ListPicker> I can

Using ListPicker and DataBinding

放肆的年华 提交于 2020-01-04 19:42:20
问题 Ok. I give up. I want to use ListPicker control in one of my Windows Phone apps. I am getting an Exception SelectedItem must always be set to a valid value . This is my XAML piece of ListPicker: <toolkit:ListPicker x:Name="CategoryPicker" FullModeItemTemplate="{StaticResource CategoryPickerFullModeItemTemplate}" Margin="12,0,0,0" ItemsSource="{Binding CategoryList}" SelectedItem="{Binding SelectedCategory, Mode=TwoWay}" ExpansionMode="ExpansionAllowed" FullModeHeader="Pick Categories"

Binding ListPicker.SelectedIndex problem

时光总嘲笑我的痴心妄想 提交于 2020-01-01 09:15:19
问题 I'm trying to do a two way binding of the SelectedIndex attribute of a ListPicker in a Windows Phone 7 UserControl. It raises the following exception when I set the DataContext: SelectedIndex must always be set to a valid value. This is the XAML code <Grid x:Name="LayoutRoot"> <Grid.RowDefinitions> <RowDefinition Height="Auto"/> <RowDefinition Height="Auto"/> </Grid.RowDefinitions> <toolkit:ListPicker Grid.Row="0" x:Name="List1" SelectionChanged="Picker_SelectionChanged" SelectedIndex="

How to Change ListPicker Selection Template

白昼怎懂夜的黑 提交于 2019-12-25 04:53:05
问题 I've noticed that by default in a ListPicker the border and currently selected item's text automatically are the phone's accent color. I was wondering how it would be possible to hard code these values to another color (which would be selected within the ListPicker itself). For instance, my phone theme is lime but I would like to manually set the border and highlighted text color to cobalt when the cobalt item is selected. Same for cyan, red, and so forth. My ListPicker looks like this XAML

ListPicker SelectionChanged Event Called Multiple Times During Navigation

三世轮回 提交于 2019-12-11 23:28:47
问题 I have a SelectionChanged event in a ListPicker within one of my application Pages that fires multiple times before the page is loaded. This is really inconvenient for me as when an item is selected, a MessageBox is displayed (and other actions will be performed). The MessageBox is displayed twice every time the page is NavigatedTo. How can I fix this? XAML <toolkit:ListPicker x:Name="ThemeListPicker" Header="Theme" ItemTemplate="{StaticResource PickerItemTemplate}" SelectionChanged=

How to get id values from listpicker?

纵然是瞬间 提交于 2019-12-11 19:14:18
问题 I'm developing windows Phone 8 application. In my app i use List Picker .list picker value is bind from web service (json format) My web service result return format [ - { id: "9", name: "Pizza", root_id: "4", level: "1" }, -{ id: "10", name: "Fine Dining", root_id: "4", level: "1" }, ] My XAML code for list picker <toolkit:ListPicker x:Name="filterpicker" SelectionChanged="filterpicker_SelectionChanged" Tap="filterpicker_Tap" Foreground="White" BorderThickness="0" Margin="395,-100,0,10"

Windows phone listpicker set selectedIndex

此生再无相见时 提交于 2019-12-11 17:43:45
问题 I have run into a problem with the listpicker. I have a settings page with a option called "Decimals" where you can toggle a "Toggleswitch" and if you turn the toggle on, the listpicker gets enabled. Now when you click on the listpicker, you can choose from 1 to 5 as the amount of decimals. If you choose for example the number "3" in the listpicker, it will get saved to a key on isolated storage with the value 3, if you go to the MainPage it will check the isolatedstorage and if it contains

System.Exception {System.ArgumentException} Value does not fall within the expected range

此生再无相见时 提交于 2019-12-11 14:48:57
问题 I'm getting this exception whenever i try to access m list picker control in my app. + this {App_name.App} App_name.App + sender {App_name.App} object {App_name.App} - e {System.Windows.ApplicationUnhandledExceptionEventArgs} System.Windows.ApplicationUnhandledExceptionEventArgs + base {System.Windows.ApplicationUnhandledExceptionEventArgs} System.EventArgs {System.Windows.ApplicationUnhandledExceptionEventArgs} + ExceptionObject {System.ArgumentException: Value does not fall within the

How to get the selected item from the listpicker in windows phone 8?

扶醉桌前 提交于 2019-12-11 10:33:19
问题 I am using this code for create listpicker in windows phone. <StackPanel Height="148" Margin="0,100,0,0"> <toolkit:ListPicker Grid.Row="0" FontFamily="Segoe WP Semibold" Height="176" x:Name="Additional_Time" ItemTemplate="{StaticResource PickerItemTemplate}" FullModeItemTemplate="{StaticResource PickerFullModeItemTemplate}" FullModeHeader="Cities" SelectedIndex="0" CacheMode="BitmapCache" Header="Choose Exit Time" FontSize="30" SelectionChanged="Additional_Time_SelectionChanged"/> <

Microsoft.Phone.Controls.Toolkit ListPicker throws XamlParseException

北慕城南 提交于 2019-12-11 09:07:03
问题 After being advised that the native ComboBox was not the way to go I was told to look at the Silverlight Toolkit ListPicker . So I did and have got a problem. I opened a new project and pulled a new ListPicker onto the MainPage. The ListPicker looks like: <toolkit:ListPicker x:Name="Result"> <toolkit:ListPickerItem Content="Win" /> <toolkit:ListPickerItem Content="Place" /> <toolkit:ListPickerItem Content="Lose" /> </toolkit:ListPicker> When trying to run this I get an XamlParseException with