Silverlight ScrollToVisible issue

3 posts, 0 answers
  1. Andrey Cherepakha
    Andrey Cherepakha avatar
    21 posts
    Member since:
    Apr 2010

    Posted 05 Dec 2011 Link to this post

    Hi!

    I have a Silverlight application. While using ScrollToVisible I faced with the scroll issue. The vertical scroll bar did not reach the bottom of the container. Please, see the screen shot for details.

    The example how I use ScrollToVisible method:

    FrameworkElement parent = _app.Find.ByName("ParentName");

    FrameworkElement element = parent.Find.ByTextContent("12052011_152435_");  

     
    element.ScrollToVisible();
    element.User.Click();

    Also I used the ScrolltoVisible method with both ScrolltoVisibleType parameters but without any success.

    Could you please advise how I can avoid such situation?

    Thanks.

    WebAii 2011.1.712.0
    Windows XP Prof SP 3
    IE 8
  2. Andrey Cherepakha
    Andrey Cherepakha avatar
    21 posts
    Member since:
    Apr 2010

    Posted 06 Dec 2011 Link to this post

    Well, I do not know if it is useful, I provide XML structure of elements and scroll bars.

    <scrollviewer Name="ScrollViewer" AutomationId="ScrollViewer" Uid="47304076">
        <scrollcontentpresenter Name="ScrollContentPresenter" Uid="57824424">
            <itemspresenter Name="TreeItems" Uid="42522357">
                <stackpanel Uid="47156901">
                    <treeviewitem Uid="21563641">
                     ...
                    </treeviewitem>
                </stackpanel>
            </itemspresenter>
        </scrollcontentpresenter>
        <scrollbar Name="VerticalScrollBar" AutomationId="VerticalScrollBar" Uid="50657768" />
        <scrollbar Name="HorizontalScrollBar" AutomationId="HorizontalScrollBar" Uid="53266729" />
    </scrollviewer>

    For now I see two workarounds to solve the issue:
    1. Use shorter folder names
    2. Adjust Tree View width.

    I have choosen second way. Luckily, there is splitter in my application between Folders Tree View and Files Data Grid. So, I do it in following way:

    app.Find.ByName<GridSplitter>("GridSplitterName").User.DragTo(20,0, true);

    It works fine. Anyway, I would like to know, if it is a problem on my end with elements placement or something wrong in ScrollToVisible method.

    Thanks.
  3. Plamen
    Admin
    Plamen avatar
    8 posts

    Posted 08 Dec 2011 Link to this post

    Hello Andrey Cherepakha,

    I'm sorry you are running into this problem. I tested against some of our demo sites trying to reproduce the same behavior, but I was not able to do so. Searching in our system I found that there was a similar bug with ScrollToVisible method in one of our older releases. Could you please try to upgrade to our current SP1 release (2011.2.1117)? You can download it from your Telerik account here: Public URL .

    If this doesn't helps, would you be able to grant us access to your app or put together a sample that demonstrates this behavior? Alternatively you can point us to a public website where we can reproduce the issue.

    Hope to hear from you soon!
     
    Regards,
    Plamen
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Back to Top