longlistselector

WP8 Memory leak opening and closing PhoneApplicationPage

假如想象 提交于 2019-12-23 16:41:53
问题 I'm creating a Windows phone application that shows a list of thumbnails. I'm using a LongListSelector to do it. My application has memory leaks when I navigate forward and backward to the thumbnails list some times. I review the memory usage while using the App and I see that the memory increases when opening the page with the thumbnails (as I expect to). When I navigate back to the previous page the memory usage decrease but not as much at it was increased. Repeating the proces several

How to refresh LongListSelector after delete an item

好久不见. 提交于 2019-12-23 03:48:18
问题 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"

How to Sort a LongListSelector using CollectionViewSource

帅比萌擦擦* 提交于 2019-12-22 18:48:07
问题 I have a LongListSelector that is currently being populated with images from IsolatedStorage . I would like be able to sort these by date in ascending or descending order. I have been referencing http://babaandthepigman.wordpress.com/2011/07/03/wp7-collectionviewsource-sorting-a-listbox/ for assistance. For some reason, I have having trouble binding the ItemsSource of my LongListSelector to the CollectionViewSource to implement the sort feature. PictureRepository.cs (to load the pictures from

How to Sort a LongListSelector using CollectionViewSource

不羁岁月 提交于 2019-12-22 18:47:10
问题 I have a LongListSelector that is currently being populated with images from IsolatedStorage . I would like be able to sort these by date in ascending or descending order. I have been referencing http://babaandthepigman.wordpress.com/2011/07/03/wp7-collectionviewsource-sorting-a-listbox/ for assistance. For some reason, I have having trouble binding the ItemsSource of my LongListSelector to the CollectionViewSource to implement the sort feature. PictureRepository.cs (to load the pictures from

Why does WP8 LongListSelector incorrectly re-use Checked state of CheckBox?

蹲街弑〆低调 提交于 2019-12-21 16:59:53
问题 I have a WP8 LongListSelector with the following template: <DataTemplate x:Key="ItemTemplate"> <Grid Margin="0"> <Grid.ColumnDefinitions> <ColumnDefinition Width="110"/> <ColumnDefinition Width="*"/> <ColumnDefinition Width="Auto"/> </Grid.ColumnDefinitions> <controls:BlockImageControl Grid.Column="0" Width="110" Height="110" Background="Transparent" /> <TextBlock x:Name="Name" Grid.Column="1" Text="{Binding ScreenName}" FontSize="{StaticResource PhoneFontSizeLarge}" FontWeight="Bold"

WP8 LongListSelector SelectedItem not bindable

淺唱寂寞╮ 提交于 2019-12-20 23:24:01
问题 In WP8, they forgot to provide SelectedItem as a dependency property, hence I'm not able to bind to it. I fixed that using this: http://dotnet-redzone.blogspot.com/2012/11/windows-phone-8longlistselector.html On doing so, I'm noticing that I'm not able to reset the property from the ViewModel, i.e. if I set the item to null in the ViewModel, it does not impact the UI. I have already provided two way binding in the UI but still setting the item to null in the ViewModel does not change the

How to set the the zindex of datatemplate's in a longlistselector

徘徊边缘 提交于 2019-12-19 07:18:08
问题 I have a longlistselector with certain images that i add in this longlistselector. I also change the margins of this image to make the image go up or down and so on. But i want to put this image infront of another image in this longlistselector. I have tried using Canvas.Zindex. I have tried setting it at the grid level, at image level and at the top level of of the longlistselector.() But it still doesn't work. Does anybody have some idea's? You can find my code bellow: <phone

Windows phone 8 Images inside LongListSelector memory leak

别来无恙 提交于 2019-12-18 18:07:15
问题 I have a LongListSelector which contains a image control which loads a lot of images from the web, this works fine for some time, but after i loaded some images i get out of memory exception. I read other people having the same issue regarding out of memory with a lot of images but still haven't found a solution. I have read that it has something to do with image/BitmapImage cache. Here is my LongListSelector which contains the image control: <phone:Pivot Title="MY APPLICATION"> <!--Pivot

How can I get the VerticalOffset of a LongListSelector in WP8

♀尐吖头ヾ 提交于 2019-12-18 11:43:13
问题 In WP7, the LongListSelector had a underlying ScrollViewer, from which I could recover the vertical offset of the list. But in Windows Phone 8, there's no underlying ScrollViewer nor any similar class that provides me with that VerticalOffset property. I've been searching and didn't find anything. I could settle with a function that gives the first visible element in the list, but I haven't found anything either. The ItemRealized event is not useful for that, as it doesn't give the exact item

Binding data in LongListSelector

自作多情 提交于 2019-12-18 07:24:23
问题 I am referring to the example here : http://dotnet.dzone.com/articles/using-longlistselector-control Here is my code : public class Chapters { private string mainTitle; public string MainTitle { get { return mainTitle; } set { mainTitle = value; } } private List<string> subTitle; public List<string> SubTitle { get { return subTitle; } set { subTitle = value; } } } private static IEnumerable<HighwayCode> GetCityList() { return myList; // Which already contains data: MainTitle : Chapters