Codejock Forums Homepage
Forum Home Forum Home > General > XAML Snippets
  New Posts New Posts RSS Feed - Adjust height of ScrollViewer to parent
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Adjust height of ScrollViewer to parent

 Post Reply Post Reply
Author
Message
cpede View Drop Down
Senior Member
Senior Member


Joined: 13 August 2004
Location: Denmark
Status: Offline
Points: 666
Post Options Post Options   Thanks (0) Thanks(0)   Quote cpede Quote  Post ReplyReply Direct Link To This Post Topic: Adjust height of ScrollViewer to parent
    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

 

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: 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
Back to Top
cpede View Drop Down
Senior Member
Senior Member


Joined: 13 August 2004
Location: Denmark
Status: Offline
Points: 666
Post Options Post Options   Thanks (0) Thanks(0)   Quote cpede Quote  Post ReplyReply Direct Link To This Post Posted: 30 August 2008 at 7:02am
Great thanks.
 
-cpede
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.141 seconds.