Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Controls
  New Posts New Posts RSS Feed - Markup Control ScrollViewer
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Markup Control ScrollViewer

 Post Reply Post Reply
Author
Message
jpbro View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 January 2007
Status: Offline
Points: 1355
Post Options Post Options   Thanks (0) Thanks(0)   Quote jpbro Quote  Post ReplyReply Direct Link To This Post Topic: Markup Control ScrollViewer
    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

Back to Top
jpbro View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 January 2007
Status: Offline
Points: 1355
Post Options Post Options   Thanks (0) Thanks(0)   Quote jpbro Quote  Post ReplyReply Direct Link To This Post Posted: 29 September 2008 at 4:54pm
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

Back to Top
jpbro View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 January 2007
Status: Offline
Points: 1355
Post Options Post Options   Thanks (0) Thanks(0)   Quote jpbro Quote  Post ReplyReply Direct Link To This Post Posted: 29 September 2008 at 5:05pm
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

Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 30 September 2008 at 9:29am
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
Back to Top
jpbro View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 January 2007
Status: Offline
Points: 1355
Post Options Post Options   Thanks (0) Thanks(0)   Quote jpbro Quote  Post ReplyReply Direct Link To This Post Posted: 30 September 2008 at 10:29am
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

Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 30 September 2008 at 10:57am

Send email to support@codejock.com I will attach modified ocx to test.

Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.156 seconds.