Click here to Skip to main content
15,878,814 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am using a listbox with my defined DataTemplate in my desktop application but when I am resizing this window the listbox doesn't resize i.e I want that this listbox should occupy all the available space.
Posted
Comments
vasim sajad 22-Oct-12 3:03am    
CAN U POSY UR XAML ?

1 solution

Listbox (or any other control) should occupy all available space of it's container if you don't define Height, Width, HorizontalAlignment and VerticalAligment. Here is example:

XML
<Grid>
     <ListBox Margin="0,0,0,0" Name="listBox1" />
</Grid>


Hope this helps!
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900