Print Page | Close Window

Adjust height of ScrollViewer to parent

Printed From: Codejock Forums
Category: General
Forum Name: XAML Snippets
Forum Description: Post your XAML snippets here for everyone to enjoy :)
URL: http://forum.codejock.com/forum_posts.asp?TID=12023
Printed Date: 02 May 2024 at 12:00am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Adjust height of ScrollViewer to parent
Posted By: cpede
Subject: Adjust height of ScrollViewer to parent
Date Posted: 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

 




Replies:
Posted By: Oleg
Date 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


Posted By: cpede
Date Posted: 30 August 2008 at 7:02am
Great thanks.
 
-cpede



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net