This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
Hi Guys I'm trying to use a DataGrid to replace a few listboxes. The listboxes are currently displayed in tab panels. To stretch the list boxes I use this:
If I try to set the height and width in the same way for a DataGrid I get an error saying the Width cannot be negative. Looking at the sample app I can see the DataGrid is resizing but I'm blowed if I can figure out how this is done. Any clues would be gratefully accepted! Cheers |
|
|
Doh, dont worry, figured it out. I use Height and Width not ActualHeight and ActualWidth.
Cheers |
|
|
Hmm, so, this is still not right. This doesn't work for PropertyGrid. What is the best technique for achieving a Dock.Fill type of behaviour? |
|
|
Hello I don't think you should be adding the DataGrid or PropertyGrid to a TabPanel. Are you meaning to add them to a TabControl instead? By putting a control into a TabItem of a TabControl, it will stretch to fill the available space by default (No need to set the width and height using bindings). If this does not solve your problem, please send some more information about the layout you are trying to achieve. Some xaml code or/and screen shots will help. Jason Fauchelle |
|
|
:) I dont do a lot of WPF... clearly. Thanks |
|