Using version 20091.2056; writing in C#.
I'm using a ContentPane and for some reason if I try to add it via the designer, I end up with a control that has the header controls grayed out meaning I can't unpin or close the control.
If I create the components via code, I don't have the issue but I run into other time-consuming situations trying to do the entire layout via code. Would prefer not to have some of each either. Would like to lay it out in the designer.
Below are the controls up to and including the ContentPane. Any ideas what I'm doing wrong or if this is a bug and how to work around it?
Also, I really don't want the close button to be functional so would like to know how to access both to enable/disable via source. How to do that?
Thanks.
Allen
<Grid Name="layoutRoot" Loaded ="Grid_Loaded" >
<Grid.ColumnDefinitions > <ColumnDefinition Width ="Auto" />
...
allenovereem said: Below are the controls up to and including the ContentPane. Any ideas what I'm doing wrong or if this is a bug and how to work around it?
allenovereem said: Also, I really don't want the close button to be functional so would like to know how to access both to enable/disable via source. How to do that?
Thanks Andrew. That explains why it works in the code too. I was adding them to the pane in the code but didn't connect that I needed the pane in the designer since I didn't have the component to select in the toolbox. It is much like adding columns, etc. to the grid. The "new to WPF" fog clears just a little!
Now I can collapse the pane but can't expand it again. Any ideas?
I had the allowclose in there and it does cause the button to be grayed out as you say. I will use your idea for generating the custom header later on. Thanks again!