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

Silverlight ScrollToVisible issue

2 Answers 59 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Andrey Cherepakha
Top achievements
Rank 1
Andrey Cherepakha asked on 05 Dec 2011, 02:57 PM
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 Answers, 1 is accepted

Sort by
0
Andrey Cherepakha
Top achievements
Rank 1
answered on 06 Dec 2011, 02:45 PM
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.
0
Plamen
Telerik team
answered on 08 Dec 2011, 03:04 PM
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.
Tags
General Discussions
Asked by
Andrey Cherepakha
Top achievements
Rank 1
Answers by
Andrey Cherepakha
Top achievements
Rank 1
Plamen
Telerik team
Share this question
or