longlistselector

How to select an item in LongListSelector using the MVVM-pattern?

孤街醉人 提交于 2019-12-11 18:03:39
问题 I'm building application using the MVVM pattern. After clicking on one of the elements I want to see this element's details. I wrote this: XAML <phone:LongListSelector ItemsSource="{Binding Data}" Margin="0,0,0,158" SelectedItem="{Binding SelectedItem}"> <phone:LongListSelector.ItemTemplate> <DataTemplate> <StackPanel Orientation="Horizontal"> <Button> <!-- Command="{Binding ShowDetailsAction}"--> <Button.Template> <ControlTemplate> <TextBlock Text="{Binding Text}"></TextBlock> <

WP8 LongListSelector - Navigating to different pages

我的未来我决定 提交于 2019-12-11 14:23:38
问题 I have recently created a LongListSelector for my Windows Phone 8 app. However what I want to achieve now is to navigate to another page when the user taps on an item but I don't know what put in my code and also I'm not 100% as to where I should insert my uri's for each individual page. Does anyone know how I can achieve this? I would be grateful if anyone could help me with this matter. Many thanks. Partial Public Class Station_Chooser Inherits PhoneApplicationPage Public Sub New()

C# binding images from a List inside a ObservableCollection to show in LongListSelector

99封情书 提交于 2019-12-11 09:05:47
问题 I have a problem where im trying to show some images from my List inside my LongListSelector, but when im trying to bind my LongListSelector to my List which contains my images, it wont show any images. My LongListSelector in XAML: <phone:PivotItem Header="Images"> <Grid> <phone:LongListSelector LayoutMode="Grid" IsGroupingEnabled="True" GridCellSize="180,180" Margin="0,0,-12,0" ItemsSource="{Binding}"> <phone:LongListSelector.ItemTemplate> <DataTemplate> <Grid Background="{StaticResource

Loop through longlistselector to get checkbox in itemtemplate

元气小坏坏 提交于 2019-12-11 06:55:38
问题 I have This Long list selector : <phone:LongListSelector Background="Transparent" x:Name="DocSummaries" ItemTemplate="{StaticResource DataTemplate_Header}" ItemsSource="{Binding DocumentHeaders}" Margin="33,0,-5,0"/> and that list uses this itemtemplate : <Viewbox x:Name="viewboxHeader" Tag="0"> <StackPanel Orientation="Vertical" x:Name="listStackpanel" Height="330" Width="410" Margin="0,10,0,8"> <Grid x:Name="HeaderGrid" Margin="0,0,0,0" Height="325" Width="410" Background="#FF4A4A4A" >

ChangePropertyAction on Image Control in LongListSelector item template

徘徊边缘 提交于 2019-12-11 01:35:43
问题 I have a long list selector and i have a datatemplate as item template, containing an image. I want the source to change based on a property from the model. I tried with a converter but i could't get it to work. Now i'm trying with triggers. I have: <Image Name="MovieThumbnail"> <i:Interaction.Triggers> <ei:DataTrigger Binding="{Binding DataContext.IsCategoryCurrent,ElementName=LayoutRoot}" Value="true"> <ei:ChangePropertyAction TargetObject="{Binding ElementName=MovieThumbnail}" TargetName=

Substitute of WP LongListSelector in Windows Store App?

こ雲淡風輕ζ 提交于 2019-12-10 11:28:56
问题 I am working on porting a Windows Phone app to Windows Store and I looking for the best substitute of the WP LongList Selector. The ListView is not quite what I am looking for since it lacks some features I need: I need to create a grouped list of items where each group has a header and a footer. Grouping and headers are no problem in ListView but footer are not supported (are they). Is there some control for Windows Store that has the same feature set as the LongListSelector for WP? If not

How to Sort a LongListSelector in Windows Phone

点点圈 提交于 2019-12-10 09:26:39
问题 I would like to be able to sort the data bound to my LongListSelector either in ascending or descending order. I am having trouble binding the sorted data to my LongListSelector. Originally without trying to implement a sort my solution was working, but I believe that I am missing something when sorting is involved. I have also tried How to Sort a LongListSelector using CollectionViewSource with no luck. What is the best way to sort a LongListSelector? MainPage.xaml <phone:LongListSelector x

How to bind caliburn.micro view model to WP8 LongListSelector control?

情到浓时终转凉″ 提交于 2019-12-08 08:36:28
Is there a way to automagically bind a Caliburn.Micro view model to the Windows Phone 8 LongListSelector control and auto-wire the SelectedItem property? If i understand your question correctly, then you want normal Caliburn.Micro conventions to be applied to the LongListSelector control. I don't work with Windows Phone development but i think it can be done by calling the following line of code in the Configure() method of the bootstrapper. ConventionManager.AddElementConvention<LongListSelector>(LongListSelector.ItemsSourceProperty, "SelectedItem", "SelectionChanged"); This code tells

How to bind caliburn.micro view model to WP8 LongListSelector control?

我们两清 提交于 2019-12-08 08:19:48
问题 Is there a way to automagically bind a Caliburn.Micro view model to the Windows Phone 8 LongListSelector control and auto-wire the SelectedItem property? 回答1: If i understand your question correctly, then you want normal Caliburn.Micro conventions to be applied to the LongListSelector control. I don't work with Windows Phone development but i think it can be done by calling the following line of code in the Configure() method of the bootstrapper. ConventionManager.AddElementConvention

How to refresh LongListSelector after delete an item

女生的网名这么多〃 提交于 2019-12-06 16:38:22
I have a LongListSelector like that <phone:LongListSelector Name="ListRecentFiles" LayoutMode="Grid" ItemsSource="{Binding}" GridCellSize="140,140" SelectionChanged="ListRecentFiles_SelectionChanged"> <phone:LongListSelector.ItemTemplate> <DataTemplate> <Grid Background="Red" Margin="0,0,5,5"> <TextBlock Text="{Binding NoteTitle}" Style="{Binding PhoneTextNormalStyle}" /> <toolkit:ContextMenuService.ContextMenu> <toolkit:ContextMenu x:Name="ContextMenu"> <toolkit:MenuItem x:Name="Delete" Header="Delete" Click="DeleteNote_Click" /> </toolkit:ContextMenu> </toolkit:ContextMenuService.ContextMenu