Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > MarkupLabel Control
  New Posts New Posts RSS Feed - MarkupScrollViewer horizontal scrolling
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

MarkupScrollViewer horizontal scrolling

 Post Reply Post Reply
Author
Message
Andrew666 View Drop Down
Groupie
Groupie


Joined: 15 October 2008
Status: Offline
Points: 27
Post Options Post Options   Thanks (0) Thanks(0)   Quote Andrew666 Quote  Post ReplyReply Direct Link To This Post Topic: MarkupScrollViewer horizontal scrolling
    Posted: 18 August 2012 at 7:55am
By default the MarkupScrollViewer object is displayed with a vertical scroll bar.  If the content will not fit horizontally it is simply truncated.  How can I programatically enable a horizontal scroll bar?  Thanks.
Back to Top
Xander75 View Drop Down
Senior Member
Senior Member
Avatar

Joined: 26 April 2007
Status: Offline
Points: 348
Post Options Post Options   Thanks (0) Thanks(0)   Quote Xander75 Quote  Post ReplyReply Direct Link To This Post Posted: 29 August 2012 at 3:26am
Hi,

I have used the following code in the ScrollViewer to show both the Horizontal & Vertical ScrollBars.

<ScrollViewer HorizontalScrollBarVisibility='Auto' VerticalScrollBarVisibility='Auto'>

Product: Xtreme SuitePro (ActiveX) v15.3.1
Platform: Windows 7 64-bit (SP1) Professional Edition
Languages: C#.Net using Visual Studio 2012 & Visual Basic 6.0 (SP6)
Back to Top
Andrew666 View Drop Down
Groupie
Groupie


Joined: 15 October 2008
Status: Offline
Points: 27
Post Options Post Options   Thanks (0) Thanks(0)   Quote Andrew666 Quote  Post ReplyReply Direct Link To This Post Posted: 10 September 2012 at 6:17am
I thought this was a straightforward "how to" question... clearly its more tricky.  Anyone?
Back to Top
Andrew666 View Drop Down
Groupie
Groupie


Joined: 15 October 2008
Status: Offline
Points: 27
Post Options Post Options   Thanks (0) Thanks(0)   Quote Andrew666 Quote  Post ReplyReply Direct Link To This Post Posted: 06 October 2012 at 8:08am
Good news - there's a simple technique I've discovered to address this issue, that could be used to incorporate any XAML properties, even if they're not revealed programatically.
 
All you have to do is create the ScrollViewer in XAML first, making sure you give it a unique name, then create a MarkupScrollViewer object using MarkupUIElement.FindName.
 
For example, you would create the ScrollViewer using XAML like this:
 
<Page xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation' xmlns:x='http://schemas.microsoft.com/winfx/2006/xaml'>
<ScrollViewer VerticalScrollBarVisibility='Auto' HorizontalScrollBarVisibility='Auto' Name='Scroller'></ScrollViewer></Page>
 
And assign this to the control Caption.
 
Then use this to get the ScrollViewer object:
 
Dim pScrollViewer As MarkupScrollViewer
Set pScrollViewer = Me.markupIcons.MarkupContext.CreateObject("ScrollViewer")
Set pScrollViewer = Me.markupIcons.MarkupUIElement.FindName("Scroller")
 
Now you can use the pScrollViewer object as before - but it will now be displayed with a horizontal scroll bar when this is necessary - something you can't reproduce purely from pScrollViewer properties.
 
Smile
 
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down



This page was generated in 0.079 seconds.