This is a migrated thread and some comments may be shown as answers.

Trying to use BringIntoView after setting DataContext

1 Answer 54 Views
JumpList
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
wildbohr
Top achievements
Rank 2
wildbohr asked on 10 Jul 2013, 04:06 PM
Hey I am having an issue where I am trying to scroll to the current time in a jumplist. My jump list headers are based on DateTime objects.
After I've set the DataContext:
this.radLBFriList.DataContext = schResult.panels;


I loop through the Groups to find one that matches the time:
private DataGroup getGroup(int currHour)
{
   foreach (DataGroup group in radLBFriList.Groups)
   {
    
if (((DateTime)group.Key).Hour == currHour)
     {
      
return group;
     }
   }
  
return null;
}

DataGroup currgroup = getGroup(DateTime.Now.Hour);
radLBFriList.BringIntoView(currgroup);


What's going on though is it's always the top of the JumpList. I set a break point and it's finding the proper group but I did notice that when it's calling BringIntoView the data hasn't been displayed yet. So my assumption is because the data isn't shown the BringIntoView can "scroll" to the actual position. Is there an event on radjumplist I could use that would guarantee me the display is loaded and call bringintoview there?

1 Answer, 1 is accepted

Sort by
0
wildbohr
Top achievements
Rank 2
answered on 10 Jul 2013, 11:57 PM
Groan ignore me.. it's working fine. I didn't think it was because I have a number of panorama's and it was scrolling one not in view :)
Tags
JumpList
Asked by
wildbohr
Top achievements
Rank 2
Answers by
wildbohr
Top achievements
Rank 2
Share this question
or