I have a LLS which shows 2 groups of friends (online and offline). My problem: when i start scrolling LLS - it has 2 variants: 1) LLS scrolling good, 2) it doesnt scrolls. When it doesnt scrolls - I start to verticaly scrolling screen in different places, and in some place of the screen I find the position, where LLS starts scrolling. But! In the second time - in this place LLS doesn't scrolls, and I again try to find the place on screen where LLS scrolling. It looks like LLS's scrollviewer randomly change position and size. Here is my LLS:
<controls:PanoramaItem Header="1"> <Grid Height="500" > <toolkit:LongListSelector Name="AllFriendsList" Height="500" Width="420" ItemTemplate="{StaticResource citiesItemTemplate}" ListHeaderTemplate="{StaticResource citiesListHeader}" ListFooterTemplate="{StaticResource citiesListFooter}" GroupHeaderTemplate="{StaticResource groupHeaderTemplate}" GroupItemTemplate="{StaticResource groupItemTemplate}" > <toolkit:LongListSelector.GroupItemsPanel> <ItemsPanelTemplate> <toolkit:WrapPanel/> </ItemsPanelTemplate> </toolkit:LongListSelector.GroupItemsPanel> </toolkit:LongListSelector> </Grid> </controls:PanoramaItem>
and styles:
<DataTemplate x:Key="citiesListHeader"> <Border Background="Purple"> <TextBlock Text="Cities Header" /> </Border> </DataTemplate> <DataTemplate x:Key="citiesListFooter"> <Border Background="Green"> <TextBlock Text="Cities Footer" /> </Border> </DataTemplate> <!-- The template for city items --> <DataTemplate x:Key="citiesItemTemplate"> <StackPanel Grid.Column="1" VerticalAlignment="Top"> <Line Style="{StaticResource Line1}" ></Line> <Line Style="{StaticResource Line2}" ></Line> <TextBlock Margin="75,15,40,0" FontSize="30" Name="Name" Text="{Binding Name}" Tap="GetUserInfo" /> <Image HorizontalAlignment="Left" Width="75" Name="Photo" > <Image.Source> <BitmapImage UriSource="{Binding Image}" CreateOptions="BackgroundCreation" /> </Image.Source> </Image> </StackPanel> </DataTemplate> <!-- The group header template, for groups in the main list --> <DataTemplate x:Key="groupHeaderTemplate"> <Border Background="YellowGreen" Margin="6"> <TextBlock Text="{Binding Title}" FontSize="40" Foreground="Black"/> </Border> </DataTemplate> <DataTemplate x:Key="groupItemTemplate" > <Border Background="YellowGreen" Width="99" Height="99" Margin="6"> <TextBlock Text="{Binding Title}" FontSize="40" Foreground="Black"/> </Border> </DataTemplate>
I didnt change controls names, I tooked them from here .
Answer: 1
The problem is in that scroll works only on the controls. So if I put mouse on image or textblock - it scrolls fine (my LLS has empty places with out any controls), and when I try to scroll on empty place - it doesn't scrolls.
by : user1947702http://stackoverflow.com/users/1947702
No comments:
Post a Comment
Send us your comment related to the topic mentioned on the blog