Trying to use BringIntoView after setting DataContext

2 posts, 0 answers
  1. wildbohr
    wildbohr avatar
    9 posts
    Member since:
    Jun 2011

    Posted 10 Jul 2013 Link to this post

    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?
  2. wildbohr
    wildbohr avatar
    9 posts
    Member since:
    Jun 2011

    Posted 10 Jul 2013 Link to this post

    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 :)
  3. DevCraft banner
Back to Top