ScrollIntoView is not working for me

Not Answered This post has 0 verified answers | 15 Replies | 3 Followers Thread's RSS feed.

crdl
Points 280
Replied On: Fri, Feb 25 2011 1:48 PM Reply

I have a tile by using TileFromItem. Calling ScrollIntoView on that tile does nothing at all.

I am binding the tileControl to a list of Objects so the Tile is created for the item once its added to the list. The tile for the new item does exist at this point. I've done an UpdateLayout() before I make the ScrollIntoView call.

Is there any other way to simply say, put the scrollbar at the TOP. I don't even need to scroll anywhere specific. Just reset it. This is very frustrating. 

  • Post Points: 20

All Replies

Replied On: Mon, Mar 7 2011 4:50 PM Reply

Matthew,

The simpliest way to scroll the tile into view is to call ScrollIntoView method of XamTileControl passing the tile object that should be in view.  Let me know if you have any questions.

Thank you,
Sam

  • Post Points: 35
crdl
Points 280
Replied On: Thu, Mar 31 2011 12:00 PM Reply

There is something buggy about Scrolling in your XamTilesControl.

I made a static set of tiles and i made a button that does ScrollIntoView on the Tile, because theres no objects now and it doesn't work. When I don't have a list of objects, only static tiles, what should I do?

I gave the static tile a name to reference and did .BringIntoView and this works occasionally but most of the time the scroll bar moves but the tiles don't. 

When Binding to a list of dynamic objects neither method works. I can get the TileFromItem and do .BringIntoView on the tile object. Nothing. I do ScrollIntoView on sending the actual object... nothing...

A huge complaint from my client is that when a new tile is added they want the container to scroll up to the top where it is located. I cannot get your tool to allow me to scroll it programatically, only manually.

I'm using 10.1.20101.1000 

This is not Matthew, but Cody.

 

Edit: I created a blank tilesControl with none of the styling I had done or the NormalMode constraints or binding and ScrollIntoView works. Where is there documentation as to why certain features and constrains and which features and constrains, most importantly, effect this?

  • Post Points: 5
crdl
Points 280
Replied On: Thu, Mar 31 2011 12:31 PM Reply

Quick tidbit... the tilesControls's that work animate on load, even when using static tiles, and the ones that don't just have the tiles there, no animation. If that makes any sense.

  • Post Points: 5
crdl
Points 280
Replied On: Tue, Apr 5 2011 2:00 PM Reply

Still looking for some details here. Sometimes it works sometimes it doesn't. What settings, stylings, etc should I avoid? I managed to get it to work on a tiles control that I'm binding objects to, but now the one I've got static XAML defined Tiles in will not.

  • Post Points: 5
crdl
Points 280
Replied On: Tue, Apr 19 2011 4:59 PM Reply

I'm still looking for some insight on this.

I have one tile control that will react to BringIntoView on a tile. They are static tiles set in the xaml. 

I have another that will NOT scroll programmatically at all. 

 

This is very important to the usability of the entire project. The newest tile needs to be brought into view when it is added.

  • Post Points: 20
Replied On: Tue, Apr 19 2011 5:03 PM Reply

I am currently looking into this. I will post more information as soon as I have them.

Thank you,
Sam

  • Post Points: 35
crdl
Points 280
Replied On: Tue, Apr 19 2011 5:11 PM Reply

I look forward to it. 

If it helps, I've noticed today that I get

A first chance exception of type 'System.InvalidOperationException' occurred in System.Core.dll

As I step over the line that calls ScrollIntoView()

  • Post Points: 5
crdl
Points 280
Replied On: Tue, Apr 19 2011 5:37 PM Reply

http://www.cwithb.com/2009/04/virtualized-wpf-listbox-scrolling-because-scrollintoview-doesnt-always-work/

 

Do you guys use Virtualization anywhere? I bet its related to why the listbox doesn't always scroll either... 

  • Post Points: 20
Replied On: Tue, Apr 19 2011 6:27 PM Reply

I submitted this in our issue tracking system with an issue ID of 73180.  It will be assigned to a developer to research for a fix, workaround, or other resolution.  If some other resolution is reached, I will contact you with this information.


Thank you,
Sam

  • Post Points: 20
crdl
Points 280
Replied On: Tue, Apr 26 2011 4:56 PM Reply

Thanks! 

  • Post Points: 5
crdl
Points 280
Replied On: Fri, Jun 3 2011 2:52 PM Reply

Any progress? This is most bothersome to the client. Its always the little things that people focus on.

  • Post Points: 20
Replied On: Fri, Jun 3 2011 5:59 PM Reply

This issue was fixed recently, and the service release that addressed the issue is already out. Please download the latest SR and test your application, and let me know if you have any questions.

Thank you,
Sam

  • Post Points: 5
crdl
Points 280
Replied On: Thu, Jul 7 2011 12:27 PM Reply

Ok, well.... ScrollIntoView is NOT fixed. I installed the update (I'm using 10.1.20101.2216)

However, I'm having more luck this time with the BringIntoView function on the Tile object. Now my problem is that it scrolls RANDOMLY! I tell it to scroll to the top object:

Tile t = tilesControlResults.TileFromItem(resultList.First());
 t.BringIntoView();

And it scrolls to the very BOTTOM of the area. WTF man? More interesting is that if I do:

resultList.Last()

it scrolls to the very BOTTOM minus 1 tile.....

Please tell me precisely what I should be doing to scroll to the TOP when a new item is added. That's all I need.

 

EDIT: Just to clarify. ScrollIntoView continues to do nothing at all. Ever.

  • Post Points: 5
crdl
Points 280
Replied On: Mon, Jul 18 2011 3:58 PM Reply

Looking for more assistance here. This doesn't' work as expected.

  • Post Points: 20
Page 1 of 2 (16 items) 1 2 Next > | RSS