OT: Silverlight UI Help
Old forum URL: forums.lhotka.net/forums/t/7096.aspx
Jack posted on Friday, June 12, 2009
I'm having problems with putting together composite views and controlling the sizing. I thought things were working well but I've missed something along the way and its a nightmare.
Basically I've got a parent view with a three row grid with heights defined as auto/*/auto. This works well for filling in a header, body/details, and a footer.
I then put a ContentControl in the detail row with the plan of 'inserting' my child from code behind. It works fine except I cannot seem to get a handle on sizing anything. Any user control that I drop into the contentControl has no height restriction so its expanding off the visual page. Even if I wrap it in a scrollView it still grows.
Somewhere I am missing the piece that lets the controlControl contain the childControl and expand solely into the visual space.
I've tried wrapping it in other controls but I'm so frustrated I'm sure I'm missing the simple bit.
Thanks
jack
Jack replied on Friday, June 12, 2009
For anyone else...
In lieu of <ContentControl x:Name="DataFieldsPanel"/> in XAML
<ContentControl x:Name="DataFieldsPanel">
<ContentControl.Template>
<ControlTemplate>
<Grid>
<ContentPresenter />
</Grid>
</ControlTemplate>
</ContentControl.Template>
</ContentControl>
esaulsberry replied on Monday, June 15, 2009
Beats me. Perhaps The Doctor can help.
http://www.drwpf.com/blog/
(you'll find he's pretty good at resonding to questions, too.)
Copyright (c) Marimer LLC