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
|
Hello, We are using the PropertyGrid in a wizard which is from a thirdparty Actipro. The issue is that the column with the propertyname appears collapsed. I have included a repro project. However you may need to download a trial version of Actipro and add a reference to their WPF wizard dll. Run the application and click on the "wizard" button. A dialog pops up with a propertygrid which you will note you can see both columns. Click on the "Next" button and it will advance to the next page which has a similar propertygrid. However in the second propertygrid you will see that the name column is collapsed. I have tested it with other WPF thirdparty propertygrids and they seem to be okay. I have also debugged into your code and found that the DesiredSize for the gridcolumn is 4 and the ActualWidth is 0.0 and Width is NaN. I have tried changing some of this code and also changing the templates used in the PropertyGrid but with no success. Please let me know if you need anything else. Thanks Oscar |
|
|
Hi Oscar, The best solution to work around this is to set the attached ms:TreeListView.ResizeColumnWidth property on the PropertyGrid control to a suitable value. Before you do though, you'll need to get the next nightly build to fix an issue around this. Unfortunately I also was unable to find a proper solution to this. The code controlling the size of the column is actually inside the WPF GridViewColumnHeader class. The Width of the column being NaN is correct, and should signal the header to auto size the column. I have not been able to determine why it is unable to do so. Let me know if you have further questions about the work around. -Jason Fauchelle |
|
|
Thanks Jason. Your work around is working. In case this helps narrow down the cause or helps with a better solution on your end I also found the following. If I add the following code to the PropertyGrid Loaded event then it works without the need specify a width.
Thanks Oscar |
|
|
Interesting. Thanks for mentioning that, I appreciate it. If I get some time I'll use this to look into a proper solution. -Jason Fauchelle |
|
|
Hi Jason, For future reference when you have time. Some additional info in case it helps you with figuring out what may be going on with this issue. Please see the attach repro project. I created a usercontrol with the propertygrid in it. I detect when the selectedObject changes in order to set the SelectedObject in the PropertyGrid. This selectedObject changes when the user navigates to the next page in the wizard. If in the SelectedObject change event I first set the PropertyGrid.SelectedObject to null and then to the SelectedObject then everything works fine. The first column is shown. However if the PropertyGrid.SelectedObject is not first set to null then the first column is collapsed. ...Oscar |
|