Markup Control ScrollViewer |
Post Reply |
Author | |
jpbro
Senior Member Joined: 12 January 2007 Status: Offline Points: 1355 |
Post Options
Thanks(0)
Posted: 29 September 2008 at 4:50pm |
I currently update a Markup controls caption using a timer. The XAML markup includes a ScrollViewer, and I would like to be able to get the thumb position of the scrollbar so that I can restore the position of the thumb after updating the content, otherwise if the user has scrolled away from the top of the page, the view gets reset to the top of the page after changing the Caption property.
Is there a way to get & set the position of a ScrollViewer thumb? If not, another option would be to set the VerticalScrollBarVisibilty attribute to Disabled and then roll my own scrollbar. But this would require the ability to get the Height of rendered XAML in the Markup control. Is there a way to do this? To recap: 1) Is there a way to get & set the position of a ScrollViewer thumb in XAML? 2) Is there a way to get the rendered height of XAML in the Markup control? 3) If the answer to both of these questions is curently NO, is there any chance on either or both of these requirements to be implented? Thanks in advance. |
|
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3 Language: Visual Basic 6.0 SP6 |
|
jpbro
Senior Member Joined: 12 January 2007 Status: Offline Points: 1355 |
Post Options
Thanks(0)
|
Looking around the web, I found a VerticalOffset attribute, but it doesn't seem to be implented (plus I could set it, but I'm not sure if there is a way to get attribute values from the control).
I also have found an ExtentHeight & ViewportHeight properties, but again I don't know if there is a way to retrieve values from the Markup control. |
|
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3 Language: Visual Basic 6.0 SP6 |
|
jpbro
Senior Member Joined: 12 January 2007 Status: Offline Points: 1355 |
Post Options
Thanks(0)
|
Ok, last addendum. I see that you can use the MarkupContext property to create markup objects and then add then to the Markup control. Unfortunately, while many objects exist (like MarkupTextBlock, for example), there is no corresponding MarkupScrollViewer object. I guess I would need this to be able to programmatically interact with the ScrollViewer scrollbar.
|
|
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3 Language: Visual Basic 6.0 SP6 |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Hi,
Thanks good points. Added for 12.1.
Here code for final release:
Dim VerticalOffset As Long If (Not Me.MarkupLabel1.MarkupUIElement Is Nothing) Then VerticalOffset = Me.MarkupLabel1.MarkupUIElement.FindName("sv").VerticalOffset End If Me.MarkupLabel1.Caption = "<ScrollViewer Name='sv'><StackPanel>" & l_Text & "</StackPanel></ScrollViewer>" Me.MarkupLabel1.MarkupUIElement.FindName("sv").VerticalOffset = VerticalOffset |
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
jpbro
Senior Member Joined: 12 January 2007 Status: Offline Points: 1355 |
Post Options
Thanks(0)
|
Excellent news Oleg! Thanks a lot...
Is there an updated beta that I can try? |
|
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3 Language: Visual Basic 6.0 SP6 |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Send email to support@codejock.com I will attach modified ocx to test. |
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |