<Window x:Class="SizingTest.Window1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="Window1" Width="Auto" Height="Auto" SizeToContent="WidthAndHeight" >
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition />
<RowDefinition />
<RowDefinition />
</Grid.RowDefinitions>
<Label Margin="5" Grid.Column="0" Grid.Row="0">Value 1:</Label>
<Label Margin="5" Grid.Column="0" Grid.Row="1">Value 2:</Label>
<Label Margin="5" Grid.Column="0" Grid.Row="2">Value 3:</Label>
<TextBox Margin="5" Grid.Column="1" Grid.Row="0" MinWidth="100" />
<TextBox Margin="5" Grid.Column="1" Grid.Row="1" MinWidth="100" />
<TextBox Margin="5" Grid.Column="1" Grid.Row="2" MinWidth="100" />
</Grid>
</Window>
Christian
Thanks for the valuable information
Posted by: Brother | 07/07/2008 at 04:43 PM
I didn't know this. It solved my problem! Thanks!
Posted by: Dragoljub | 04/22/2009 at 05:02 PM
thanks, it helped
Posted by: sty21um | 05/06/2009 at 10:33 PM
That's fine, but if you don't want the USER to resize the window, add: ResizeMode=NoResize to the window properties, i.e. Window ... ResizeMode=NoResize ... /Window
Posted by: Gregg | 09/21/2009 at 04:32 AM
thnx, christian. It works for me, also.
Posted by: subha basu | 12/01/2009 at 08:39 AM
A great boost emotional strength, therefore, it is an important precondition of all ethical behavior, who had no strong ambition, also won't be able to put this warm in career aspirations.
Posted by: jordan shoes | 10/13/2010 at 02:27 AM
In my WPF application, i have many Components like Grids, StackPanels and inside them other components.
What I want to do is to autoresize all these components according to how the user resizes the window of the Application. I want user to see all components, no matter how small they will become...
I have put them all in a ViewBox, but when I maximize my application I see left and right white spaces.
What are the steps to do application's components auto-resized and auto-adjusted to the window???
I should change the size of ALL components dynamically? (I hope not...)
Posted by: wow account | 10/15/2010 at 05:38 AM
sounds awesome! and this post is just gorgeous!*
Posted by: coach outlet stores | 11/02/2010 at 01:44 AM
At Christmas and always, may peace and love fill your heart, beauty fill your world, and contentment and joy fill your days.
Posted by: Supra Shoes | 11/04/2010 at 07:00 AM
i love you post
Posted by: moncler jackets | 11/11/2010 at 03:12 AM
i love you post
Posted by: moncler jackets | 11/11/2010 at 03:12 AM
Very nicely written post it contains useful information for me. I am happy to find your distinguished way of writing the post. Now you make it easy for me to understand and implement the concept. Thank you for the post.
Posted by: beat making software | 11/11/2010 at 03:25 AM
oh so funny!
Posted by: air max 90 | 11/12/2010 at 07:06 AM
nothing is impossible for a willing heart.
Posted by: coach outlet | 11/12/2010 at 09:29 AM
Tomorrow is an other day!@
Posted by: air max 90 | 11/13/2010 at 08:37 AM
*I hope my family and all friends are happy everyday.
Posted by: christian louboutin | 11/17/2010 at 02:56 AM
hello..This is a great web site. Good polished UI and nice informative articles. I will be coming back in a bit, thanks for the great article.
Posted by: Link building | 11/23/2010 at 10:24 AM
Дизайн, ремонт квартир киев офисов
Posted by: FJODOROVIvan19 | 01/01/2011 at 08:30 AM
Do something to have faith, believe in yourself
Posted by: coach outlet online | 01/03/2011 at 01:59 AM
It's a Very helpful article for me. Actually, I am fond of reading online punjabi news. Thanks for writing such a complete ..And,I wantn't to miss them.
Thank you for sharing..
Posted by: Newxe | 01/05/2011 at 07:17 AM
Finally found what I want, I'm a beginner content inside of great help to me with you, share
Posted by: thomas sabo | 01/20/2011 at 03:14 AM
I like your post & I will always be coming frequently to read more of your post. Thank you very much for your post once more.
Posted by: Cars Ghana | 02/23/2011 at 03:44 PM
Nice info you have here. I hope this will help a lot of people. Keep up the good work...We hope you will visit our blog often as we discuss topics of interest to you.
Posted by: Dubai car rentals | 02/27/2011 at 12:23 PM
I became interested in the topic and I am thinking whether I could use your texts on my paper, of course with the quotation. Please contact with me, thanks very much.
Posted by: Thomas Sabo Australia | 05/11/2011 at 04:47 AM
I became interested in the topic and I am thinking whether I could use your texts on my paper, of course with the quotation. Please contact with me, thanks very much.
Posted by: Thomas Sabo Australia | 05/11/2011 at 04:59 AM