![]()  | 
 
Adjust height of ScrollViewer to parent | 
 
    Post Reply  
   | 
  
| Author | |
   
   cpede  
   
   Senior Member  
   Joined: 13 August 2004 Location: Denmark Status: Offline Points: 683  | 
  
   
      Post Options
    
        Thanks(0)
      Quote   Reply
   
     Topic: Adjust height of ScrollViewer to parentPosted: 29 August 2008 at 10:26am  | 
 
| 
   
    
   How can I get a ScrollViewer to automatically adjust it's height to the parent TAG?
 
   
  I want to have a ScrollViewer inside a StackPanel, and let the ScrollViewer size to the StackPanel? 
<StackPanel Height="400"> 
<TextBlock>My Title</TextBlock> 
<ScrollViewer Height="?"> 
<StackPanel> 
... 
</StackPanel> 
</ScrollViewer> 
</StackPanel> -cpede 
  | 
 |
![]()  | 
 |
   
   Oleg  
   
   Senior Member  
   Joined: 21 May 2003 Location: United States Status: Offline Points: 11234  | 
  
   
      Post Options
    
        Thanks(0)
      Quote   Reply
   
     Posted: 29 August 2008 at 4:16pm | 
 
| 
   
    
   Hi,
 
   
  StackPanel can't do it. Use Grid instead. First Row.Height = "Auto" Second Row.Height = "*" 
    | 
 |
| 
   
     
     Oleg, Support Team 
   
  CODEJOCK SOFTWARE SOLUTIONS  | 
 |
![]()  | 
 |
   
   cpede  
   
   Senior Member  
   Joined: 13 August 2004 Location: Denmark Status: Offline Points: 683  | 
  
   
      Post Options
    
        Thanks(0)
      Quote   Reply
   
     Posted: 30 August 2008 at 7:02am | 
 
| 
   
    
   Great thanks.  
   
   
-cpede 
    | 
 |
![]()  | 
 |
    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  |