[Webinar] Streamline your web hosting managementRegister Today

x
?
Solved

How to know current offset of a ScrollViewer Offset in WPF

Posted on 2010-04-06
1
Medium Priority
?
988 Views
Last Modified: 2013-12-17
Hi,

We are creating a Thumbnail Viewer in WPF. For the scrollviewer nature, when user press the arrow key on the keyboard, it will auto scroll by some offset.  We would like the Thumbnail Viewer to be auto scroll as well when we move to the edge.

Just wondering how can we know what is the current scrollviewer offset? So that we could do something like my_scrollViewer.ScrollToHotizontalOffet(__CurrentOffset + 0.1)

Thanks in advance.
0
Comment
Question by:cybeh
1 Comment
 
LVL 16

Accepted Solution

by:
CuteBug earned 2000 total points
ID: 29904554
Use the HorizontalOffset Property of the ScrollViewer to get the HorizontalOffset.

In order to set the HorizontalOffset, use the ScrollToHorizontalOffset() method of the scrollviewer.

0

Featured Post

Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
Simulator games are perfect for generating sample realistic data streams, especially for learning data analysis. It is even useful for demoing offerings such as Azure stream analytics, PowerBI etc.
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
Free Data Recovery software is an advanced solution from Kernel Tools to recover data and files such as documents, emails, database, media and pictures, etc. It supports recovery from physical & logical drive after a hard disk crash, accidental/inte…

591 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question