ListView jiggles horizontally when large item about to scroll in or out in Windows Phone 8.1 Preview

If you have a ListView (in a Windows Phone 8.1 Store app, running on the developer preview 8.10.123979.895) in which you do not explicitly constrain the size of your list view's item template (e.g., because you'd like it to resize automatically when
the screen is rotated, or to adapt well to larger screen sizes), a problem arises if some of the items in your list want to be wider than the screen. They are correctly cropped, but as you scroll down through the list, the whole list jiggles left and right
as the long item is about to scroll into view, or shortly after it has scrolled out of view.
The built-in Calendar app suffers from this problem, by the way, so even if it's possible to avoid this in my own app, the Calendar app needs fixing... If you create a large number of appointments on a single day, where most of the appointments have short
names, but one has a long name, and you then tap the day to expand its list of appointments for that day, you'll see this jiggling from left to right as you scroll through the appointments.
Here's some code that reproduces the problem:
XAML:
<Page
x:Class="Wp81ScrollBug.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
<Grid>
<ListView
x:Name="myList">
</ListView>
</Grid>
</Page>
Codehind for that:
using System.Linq;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Navigation;
namespace Wp81ScrollBug
public sealed partial class MainPage : Page
private string[] _source =
Enumerable.Range(1, 80).Select(i => "Short " + i)
.Concat(new[] { "This item is much longer than the rest and causes problems as virtualization adds and removes it" })
.Concat(Enumerable.Range(81, 80).Select(i => "Short " + i)).ToArray();
public MainPage()
InitializeComponent();
NavigationCacheMode = NavigationCacheMode.Required;
myList.ItemsSource = _source;
protected override void OnNavigatedTo(NavigationEventArgs e)
You can get rid of the problem by adding this inside the ListView:
<ListView.ItemTemplate>
<DataTemplate>
<ContentControl Width="480" Content="{Binding}" />
</DataTemplate>
</ListView.ItemTemplate>
but this is unsatisfactory, because it no longer handles orientation changes or different screen sizes - when you rotate the screen, the long item doesn't get to use the whole width.

The Jiggle is due to virtualization and an attempt to fit the contents.  The only solution I can think of is to set the width based on the orientation.
Jeff Sanders (MSFT)
@jsandersrocks - Windows Store Developer Solutions
@WSDevSol
Getting Started With Windows Azure Mobile Services development?
Click here
Getting Started With Windows Phone or Store app development?
Click here
My Team Blog: Windows Store & Phone Developer Solutions
My Blog: Http Client Protocol Issues (and other fun stuff I support)

Similar Messages

  • When will there be an adobe flash player available to Windows Phone users?

    I'm just wondering when there will be a flash player available to windows phone users.

    No one here would be privi to Apple's plans on the matter. Submit your feedback to Apple requesting such a feature:
    http://www.apple.com/feedback
    In the interim, there is a reminder program for pretty much every need and taste in the App Store.

  • HT2729 Help pls! About to toss my ipod out the window!

    i recently downloaded a free video, kip moore's there's something about a truck to my itunes, yet no matter how many times I sync my ipod it won't transfer. What am I doing wrong? It's been years since I've put anything on here due to pc issues and I don't remember it being this hard....
    Also, about a year ago it just stopped playing on any docking stations, will only play thru headphones and some cheap thing that i got that plugs into the headphone jack.  Any idea why this happened? It charges on all docking stations, just doesn't play.
    Any help would be soooooooooooooooooooooooooooooooooo appreciated!
    Thanks in advance!

    You are probably experiencing a bug known to this community but unacknowledged by Apple. There is a flaw in the way iOS manages the music library, a flaw easily triggered by the syncing process with iTunes.
    Let me commiserate. I have an iPod touch iOS 6.0.1 set to manually manage music, and it gets automatically mangled with this data deletion bug multiple times each week. Each time, I have to start all over again trying to find all the music tracks that belong on it from my archives, re-organizing the playlists in some former semblance.
    This bug seems to affect iOS 6.x devices set to manually manage music the most, but other versions of iOS and device setups are affected. From what I've frequently experienced, and read from the accounts of others, is that suddenly you will find in iTunes that every track on the device is gone but there is still a record of it existing along with associated metadata (such as playcount). Each track will have an exclamation point picon next to it, indicating that there is a record of the track existing but that iTunes/iOS deleted the reference to it. When disconnected, the Music app on iOS will show no songs and provide an ad link to go to iTunes Music Store.
    If you are fortunate after this point, additional sync sessions with iTunes may begin to restore the music again. This can be a very long experience as each track has to be transferred anew. Hope for this occurance decreases if you have your device set to manually manage music. Hope decreases further if the collection of music tracks is a variety of files from different sources not included in your computer iTunes library.
    I have been carefully following this bug and no one has a viable workaround. We are patiently awaiting an update from Apple. I suggest sending feedback to Apple each and every time this bug affects you:
    http://www.apple.com/feedback/ipodtouch.html

  • My iphone thinks I'm using a headphone when I'm not, and no sound comes out of the phone. How can I fix this?

    It works fine in my car (when it's connected to bluetooth). But otherwise, the sound on the phone is dead.
    What can be wrong and how can I fix it?

    Please not that the iPhone uses mono channel for internal speakers, the other path that you see is not the speaker per say. It is the phone microphone. Try using headphones, you will hear both channels. If the problem still persists when using headphones, check your sound balancing in the settings. Go to setting-general-accessibility scroll down and check the slide under mono audio. It should be put at the centre for you to hear both channels ON YOUR HEADPHONES

  • About to throw this mb OUT THE WINDOW

    Ok bought a new 915p combo Motherboard and it posts and does all of that just fine.
    However Now I cant get it to boot Xp. And yea I know what your going to say fresh install xp
    but there is another glitch I cant even get it to run my harddrive utility disk or cd.

    Quote from: Grey Falcon on 20-February-05, 07:50:13
    OK I got to the 1st part of the setup
    Works fine up till the point of the 1st reboot then it just wants to restart back the begining again
    This might seem utterly, absurdly, stupidly obvious, but in my experience sometimes obvious solutions are the most difficult to arrive at. You say it wants to start back at the beginning after the first reboot: have you either taken the CD out of the drive or changed the boot order in then bios? I’ve seen the setup program just initiate itself on the first reboot when I hadn’t even touched the keyboard (you’re supposed to get the message “press any key to setup windows” or some such) That sounds like what might be happening.

  • About to throw the MOBGo out the window

    okay, had it with this board.    I just got the 865PE-LS..it will sometimes post and sometimes won't go any further in powering up than me pressing the button..when i first installed the baord, the system did post and i was able to install the updates(used the MSI Live update utility)1st update was to the BIOS.  Current Ver. 2.5 Biggest issue i see with the older Bios is the CPU temp reading too high, so this would make me think that the system would just shut down.  I waited intil i got the pop up saying it is now safe to restart your computer.. did this.. proceeded to install other MSI updates and then my world went to pot.. the system would sometimes post in to windows, sometimes not, sometimes nothing at all.. tried a different proc (2.6), differnt PSU (just installed a New Out of Box ANtec 430 Tru Power) still giving me a problem.. the D-bracket is telling me that either my proc is toast or not seated correctly... reseated, checked, reseated. (wash, rinse, repeat...)  I now have my 2.6 installed rather than my nice new 3.2 (Northwood).. so.. while i am writing this, the system is making a liar out of me and has posted... i ran the live update again... and am now re-installing the latest Bios 2.5)..   all i can think of is that soething did not update correctly.. will ( can ) someone PLEASE help me..  

    Sorry aabout the DELL comment (yes i know they just slap the machines together)am just sooo fed up with this..Spent all this $$ and can't even use the machine. you helped me out a few weeks ago with the PLS board which ended up being bad.  So i sent that back and now have this issue with the new board.. i am using the memory in my other PC, have been, and the other PC runs fine and sees all the memory (1.5 gig).  I was also testing the machine with a vanilla FX 5200 and this issue was still ocuring.  Have you ever heard of an issue where the 3.2 proc hold down bracket is placing too much pressure on the board and may be causing these symptoms?  I ask because i simply set the proc and pplaced the cooling fin/fan on without completely snapping the levers in place and the PC posted and i was able to re-install the Bios update, but then all went to pot again and now have the other PC up and running.. thanks for your help, suggestions, direction  and I apologize for the DELL comment.  As you can see in my system build, i am a huge fan of MSI, just fed up at the moment with this issue.

  • HELP! I am about th throw this iPhone out the window!

    I have had to restore my iPhone TWICE now with tech support guidence. I've has nothing but TROUBLE since both the 3.0 AND the iTunes update, and am BEYOND frustrated!!! I won't even go into all of what else went wrong previously, but now my photos will NOT show up in iTunes to sync on to phone. I have troubleshooted by reading on here...I've tried everything. Before all this trouble I had done it so I know it's not just me. The folders show, but they say 0 pictures.
    Again I'm SO SO SO frustrated. A phone I LOVED and was thrilled with has been nothing but pure frustration since the 17th. Everything I do on it is nothing but a hassle and 2 hours of MY minutes with Apple techs!!! I ahve to admit I am in tears right now.
    I hope I get some replies (!!!!) and thanks in advance... why will my photos not show up? Just empty folders???

    OMG OMG I am so embarrassed....they DID go to the folder as PPSP files. I'm so sorry! Thank you though for taking your time on me. I will go change them all and see if that works. If not I promise i'll come back here before tossing the phone out the window Again I'm sorry...but hey, if it weren't for you I never would have checked. I don't know why it saved them like that!

  • TS1702 Tried every support option to stop Contacts crashing about to throw iPad 2 out the window help.

    Any more suggestions please.

    Thanks King_Penquin. Tried that. Turn on contacts, option to merge or cancel pop up. Merge throws back to home screen, cancel switches off contacts. Any more suggestions please. Opening contacts ( none in there ) on home page show blank book and switches off.

  • About to throw ipod & laptop out the window

    I received a ipod nano for Christmas and hate it already! I plugged it into my laptop that has Windows XP and got an error message stating I didn't have a high-speed USB port on my laptop. I tried both USB ports and have no idea how to get the error message to go away. All I want is songs, shouldn't that be easy enough?

    To find out what USB you have, right click on 'My Computer' then click on 'Properties' then click on 'Hardware' then click on 'Device Manager' then click on 'Universal Serial Bus controllers'. If you see Enhanced Controller, then you should have USB 2.0. If not, you do not have it.

  • 2nd DOA optical drive... about to throw the computer out the window

    MacBook Pro   Mac OS X (10.4.8)   DOA cd-rom drive (again)
    I can't believe this. I either have incredibly bad luck, or apple got a bad batch of cd rom drives from their supplier. I bought a macbook pro jan 2, the cd rom was DOA, so i sent it back. Now I have my replacement, and ANOTHER DOA cd-rom drive. Being a student, all this sitting and waiting is killing me. I am calling them tomorrow and we'll see what happens. Of course, if there is a simple fix for my cd-rom drive, please feel free to share. It refuses to read any disks.

    Welcome to Apple Discussions!
    This may have to do with the type of media being inserted, whether the media has labels on it, or the media quality.
    http://docs.info.apple.com/article.html?artnum=58641
    Note: DVD-R DL is not universally supported. Though DVD+R is much better supported. Note the burn speeds supported by your optical drive in the spec page for the machine:
    http://www.apple.com/macbookpro/specs.html

  • [WP8.1][Xaml]Update ListView items when other items are selected

    hi,
    i am developing an app for windows phone and using listview to list items. i am using custom template for the listview item. this custom template contains labels, image and button.
    i trying to update the other listview items while one item is selected or multiple item selected. to change listview item i am iterating over the listview and try to get custom template using visual tree helper class. using helper class i am able to retrieve
    control from custom template. once i changing the image in listview if i scroll the listview vertically image changed to its default state.
    is it possible to change the custom template values using visual tree helper class or do i need to do some other changes in my code.
    please suggest.
    <ListView x:Name="lst" Grid.Row="2" SelectionMode="Single" SelectedItem="{Binding ListBoxSelectedItem}"
    ItemsSource="{Binding TssVariableInfo}" Padding="0" Margin="0"
    HorizontalAlignment="Stretch" Grid.Column="0" Grid.ColumnSpan="2" ReorderMode="Disabled" AllowDrop="False"
    VerticalAlignment="Stretch" Holding="lst_Holding" >
    <ListView.ItemTemplate>
    <DataTemplate>
    <local:VariableTemplateSelectorClass Content="{Binding}" FontFamily="Segoe UI" >
    <local:VariableTemplateSelectorClass.IsLiteAndNonDuplicate >
    <DataTemplate>
    <Border BorderThickness="0,1,0,1" BorderBrush="DarkGray" x:Name="bordername">
    <Grid Margin="0,0,0,0" Tapped="Grid_Tap" x:Name="GridVarDetail" Background="#E8E8E8" Holding="Grid_Hold" HorizontalAlignment="Stretch" Width="{Binding ElementName=lst, Path=ActualWidth}">
    <Grid.RowDefinitions>
    <RowDefinition Height="Auto"/>
    <RowDefinition Height="Auto"/>
    <RowDefinition Height="16"/>
    </Grid.RowDefinitions>
    <Grid.ColumnDefinitions>
    <ColumnDefinition Width="6*" />
    <ColumnDefinition Width="4*" />
    </Grid.ColumnDefinitions>
    <Image x:Name="imgLegend" Source="/Assets/Images/Legends/00-Blank.png" Width="13" Height="13" Grid.Row="0" Margin="0,0,0,0" HorizontalAlignment="Left" VerticalAlignment="Center"></Image>
    <TextBlock Foreground="Green" Margin="14,0,0,0" Grid.Row="0" FlowDirection="LeftToRight" x:Name="lblCustomerGivenName" Grid.Column="0" TextWrapping="NoWrap" TextTrimming="WordEllipsis"
    Text="{Binding VariableCustomerGivenName }" FontWeight="Normal" HorizontalAlignment="Left" FontFamily="Calibri" VerticalAlignment="Bottom" FontSize="16" />
    <TextBlock Foreground="Green" Margin="14,0,0,0" Grid.Row="1" VerticalAlignment="Top" Width="Auto" x:Name="lblStandardName" Grid.Column="0" TextWrapping="NoWrap" TextTrimming="WordEllipsis"
    Text="{Binding VariableStandarName}" FontWeight="Normal" HorizontalAlignment="Left" FontFamily="Calibri" FontSize="16" />
    <TextBlock Foreground="Gray" Margin="14,0,0,0" Grid.Row="2" VerticalAlignment="Top" Width="Auto" x:Name="lblSection" Grid.Column="0" TextWrapping="NoWrap" TextTrimming="WordEllipsis"
    Text="{Binding SectionName }" FontWeight="Normal" HorizontalAlignment="Left" FontFamily="Calibri" FontSize="16" />
    <TextBlock Margin="321,0,40,0" Foreground="Red" Grid.Row="0" VerticalAlignment="Bottom" Width="Auto" x:Name="lblValue" Grid.Column="1" TextWrapping="NoWrap"
    Text="{Binding Value}" FontWeight="Normal" HorizontalAlignment="Right" FlowDirection="RightToLeft" FontFamily="Calibri" FontSize="16" />
    <TextBlock Foreground="Gray" Margin="321,0,40,0" Grid.Row="1" VerticalAlignment="Top" Width="Auto" x:Name="lblLastDate" Grid.Column="1" TextWrapping="NoWrap"
    Text="{Binding LastDate}" FontWeight="Normal" HorizontalAlignment="Right" FlowDirection="RightToLeft" FontFamily="Calibri" FontSize="16" />
    <Image Source="/Assets/Images/LeftArrow.png" Height="50" Width="40" Grid.Row="0" Grid.Column="1" Grid.RowSpan="3" HorizontalAlignment="Right" Visibility="Collapsed" x:Name="imgLeftArrow" Tapped="btnMore_Tap" />
    <Image Source="/Assets/Images/2Y-OFF.png" Height="50" Width="40" Grid.Row="0" Grid.Column="1" Grid.RowSpan="3" HorizontalAlignment="Right" Visibility="Collapsed" x:Name="btn2Y" Tapped="btn2Y_Tap"/>
    <Image Source="/Assets/Images/CP-Off.png" Height="50" Width="40" Grid.Row="0" Grid.Column="1" Grid.RowSpan="3" HorizontalAlignment="Right" Visibility="Collapsed" x:Name="btnTL" Tapped="btnTL_Tap" />
    </Grid>
    </Border>
    </DataTemplate>
    </local:VariableTemplateSelectorClass.IsLiteAndNonDuplicate>
    </local:VariableTemplateSelectorClass>
    </DataTemplate>
    </ListView.ItemTemplate>
    </ListView>
    private void Grid_Hold(object sender, HoldingRoutedEventArgs e)
    if (e.HoldingState != Windows.UI.Input.HoldingState.Started)
    return;
    Image imgPlotImage;
    Grid GridVar = (Grid)sender;
    imgPlotImage = (Image)GridVar.FindName("imgLegend");
    General.VariableArrayYAxis.Add(dataObject.VariableID);
    General.DictSelectedVariableType.Add(dataObject.VariableID.ToString(), dataObject.IsTSSLite.ToString());
    GridVar.Background = new SolidColorBrush(Color.FromArgb(100, 255, 255, 255));
    Image imgLeftArrow = (Image)GridVar.FindName("imgLeftArrow");
    imgLeftArrow.Visibility = Windows.UI.Xaml.Visibility.Visible;

    That link is my signature not that i have provided it for reference. 
    You already have implemented binding in your code, just like you have bindings for TextBlock's 'Text' property, likewise you can defined a property for the 'Visibility' of image in the code behind
    e.g.
    private Visibility imgvisible
    public Visibility_ImgVisibility
    get { return imgvisible; }
    set
    if (imgvisible!= value)
    NotifyPropertyChanging("_ImgVisibility");
    imgvisible= value;
    NotifyPropertyChanged("_ImgVisibility");
    Then in xaml file, bind this property with the Visibility property of Image and access it as per your requirement (e.g. on tap of an item)
    http://developer.nokia.com/community/wiki/Using_Crypto%2B%2B_library_with_Windows_Phone_8

  • Listview not grey when disabled.

    Hi, this is the issue:
    When I have a messagebox opened I disable the other windows, but I don't want them greyed out.
    I managed to change the model for all controls in order to do that, but I couldn't to it with the list view (though I managed to to it with the listview items).
    As you can see in the picture the items are of the right color when disabled, but the background is stille grey.
    When I rightclicked the listview to change the model, it automatically created this XAML code inside " <Window.Resources>", which I though I would edit like I did with all other controls:
    <ControlTemplate x:Key="ListViewControlTemplate1" TargetType="{x:Type ListView}">
    <Themes:ListBoxChrome x:Name="Bd" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" RenderMouseOver="{TemplateBinding IsMouseOver}" RenderFocused="{TemplateBinding IsKeyboardFocusWithin}" SnapsToDevicePixels="True">
    <ScrollViewer Padding="{TemplateBinding Padding}" Style="{DynamicResource}">
    <ItemsPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
    </ScrollViewer>
    </Themes:ListBoxChrome>
    <ControlTemplate.Triggers>
    <Trigger Property="IsEnabled" Value="False">
    <Setter Property="Background" TargetName="Bd" Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}"/>
    </Trigger>
    <MultiTrigger>
    <MultiTrigger.Conditions>
    <Condition Property="IsGrouping" Value="True"/>
    <Condition Property="VirtualizingPanel.IsVirtualizingWhenGrouping" Value="False"/>
    </MultiTrigger.Conditions>
    <Setter Property="ScrollViewer.CanContentScroll" Value="False"/>
    </MultiTrigger>
    </ControlTemplate.Triggers>
    </ControlTemplate>
    and then referenced the template in the listview control:
    <ListView x:Name="lstBeats_Copy" HorizontalAlignment="Left" Height="23" Margin="11,179,0,0" VerticalAlignment="Top" Width="237" Background="#FFFFE3C2" Grid.Row="1" TabIndex="3" Template="{DynamicResource ListViewControlTemplate1}" >
    But even if I don't edit it, just when its added I get:
    XamlParseException: L'impostazione della proprietà 'System.Windows.Controls.Decorator.Child' generates exception.
    Is there any way?
    Thanks!

    A Listview is a pretty simple control template wise.
    It's the listview items which are complicated.
    I would be tempted just to replace the entire template.
    Something like:
    <Style TargetType="{x:Type ListView}">
    <Setter Property="Template">
    <Setter.Value>
    <ControlTemplate TargetType="ListView">
    <Border BorderBrush="LightGray" BorderThickness="1">
    <ScrollViewer>
    <ItemsPresenter />
    </ScrollViewer>
    </Border>
    </ControlTemplate>
    </Setter.Value>
    </Setter>
    </Style>
    I'm not sure about this disabling things but not changing colour though.
    It's usual windows behaviour to change colour when disabled.
    Hope that helps.
    Recent Technet articles: Property List Editing;
    Dynamic XAML

  • Running out of disk space -- remove larger items temporarily?

    I am running out of drive space. I don't want to move my entire library to another drive.
    What I'd like to do is temporarily remove larger items, such as TV episodes, after backing them up to another drive, or burning to a DVD-R.
    And re-import select episodes only when I want to watch them.
    Is it possible to do this, and if so, can it be done without toasting the artwork? I expect the artwork is not stored in the media file itself, so that could pose a problem.
    Thanks!

    There is a section in the "About Xcode Tools.pdf" file in your /Developer folder called "Uninstalling XCode 3.0 developer tools". You should have a look at that and choose which (how much) unstallation suits you - there are several different command-lines suggested in that document with different effects.

  • Where has 'do you want to replace this file' gone when copying items in lion?

    Hello, can anyone tell me if I can still have the option when copying items from one folder to another to be asked ' do you want to replace this file' instead of only having the new options to: stop / keep both / or replace all?  thanks for your help.

    If you don't mind losing them, it's all right to do it.
    Maybe you just want to delete them instead?
    Or do you mean you want to replace the faulty one in your Projects folder with a correct one from your Applications folder?
    Is this the Application you're talking about moving?

  • How can I prevent Magic Mouse from scrolling horizontally when I don't want it to?

    I recently purchased a Magic Mouse to go with OS 10.6 Snow Leopard. It's a great mouse but it causes 2 problems:
    If I leave it on "Scroll with interia" in System Preferences/Mouse, it scrolls horizontally when I don't want it to.  Since I mostly work in Word documents, I often lose my place in the document this way. On the other hand, checking "Scroll without inertia" makes vertical scrolling, which I do all the time, a lot harder.
    The mouse seems to cause what I think of as "fractures" in Word documents--words and parts of sentences will disappear or get crunched together , then reappear when I select the place where they vanished.  They also reappear if I scroll vertically to get the problem area off the screen and then return to it. This wastes a lot of time at best; at worst, I'm afraid I'll lose work.  The problem occurred once in a while with a Logitech bluetooth mouse I was using, but not as bad and not all the time.
    I love the mouse's ergonomics and would like to keep it, but if I can't solve this problem, I'll have to return it.  Would be very, very grateful for any tips!  Thanks.

    Always nervous about recommending sites I have no personal experience of.  On the plus side it doesn't relate to any of the bad sites I am familiar with and it appears to be the developer's site ... but there is no contact point for you to ask questions.  You said in your initial post it was to go with Snow Leopard but this version says it is meant for 10.7 and above.   Did you notice that?   I also notice several other references to Word and mouse and one person found the solution lay in the updating of word 2011 to its highest level.   I can offer no more.

Maybe you are looking for