This project is read-only.

SCSFContrib workspaces are not truly dockable

Oct 2, 2007 at 4:23 PM
I mean,
When I dock a normal control and resize the window the control resizes but when I add a smart part to a workspace(from SCSFContrib) I dont see the resizing of the control.

Is there a workaround ? or Am I missing something?
Any help in this regard is highly appreciated.

Oct 12, 2007 at 8:17 AM
I have the same issue... is this just one of those "derr... it's WPF! You do it differently" things, or does it just not behave as I'd expect?

Oct 12, 2007 at 10:35 AM
(just a guess)

Make sure the user control for the smart part does not have width and height set:

<UserControl ...
    Width="300" Height="300">

This is generated by default so might be the problem.

Oct 12, 2007 at 1:03 PM
Thanks Kent, I've managed to sort out my width resizing (sure enough, there was a fixed width in there somewhere)... so it IS a newbie WPF thing. However I can't get the main layout view to fill vertically; it's always sized to the content of the tab. I'd like it to work the other way around - have the view always fill the size of the window with the contents of the tab control resizing to maintain its margins. I'm confident the tab control contents will be fine, it's just getting the view to fill vertically.

Any ideas? Thanks for your help.

Oct 15, 2007 at 8:46 AM
Hi Maverick,

It's hard to say without seeing your markup, but here are some suggestions:
  • Play with VerticalAlignment="Stretch"
  • Try using a different layout panel, such as a Grid or DockPanel (see API doc for details)
  • Try using a tool like Snoop to play around with properties and get an idea of how each property affects layout

Oct 16, 2007 at 5:04 AM

kentcb wrote:
  • Try using a different layout panel, such as a Grid or DockPanel (see API doc for details)

Yeah, that did it, thanks Kent. Changed the layout panel in my shell form to a Grid instead of StackPanel. Good stuff, thanks. And thanks for the tip on Snoop, too.