![]()  | 
 
MarkupScrollViewer horizontal scrolling | 
 
    Post Reply  
   | 
  
| Author | |
   
   Andrew666  
   
   Groupie  
   Joined: 15 October 2008 Status: Offline Points: 27  | 
  
   
      Post Options
    
        Thanks(0)
      Quote   Reply
   
     Topic: MarkupScrollViewer horizontal scrollingPosted: 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.
    
   
   | 
 |
![]()  | 
 |
   
   Xander75  
   
   Senior Member  
    
   Joined: 26 April 2007 Status: Offline Points: 353  | 
  
   
      Post Options
    
        Thanks(0)
      Quote   Reply
   
     Posted: 29 August 2012 at 3:26am | 
 
| 
   
    
   Hi, 
   
  I have used the following code in the ScrollViewer to show both the Horizontal & Vertical ScrollBars. 
  | 
 |
| 
   
     
     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)  | 
 |
![]()  | 
 |
   
   Andrew666  
   
   Groupie  
   Joined: 15 October 2008 Status: Offline Points: 27  | 
  
   
      Post Options
    
        Thanks(0)
      Quote   Reply
   
     Posted: 10 September 2012 at 6:17am | 
 
| 
   
    
   
I thought this was a straightforward "how to" question... clearly its more tricky.  Anyone?
    
   
   | 
 |
![]()  | 
 |
   
   Andrew666  
   
   Groupie  
   Joined: 15 October 2008 Status: Offline Points: 27  | 
  
   
      Post Options
    
        Thanks(0)
      Quote   Reply
   
     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.  | 
 |
![]()  | 
 |
    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  |