Hi there,
I am using this event to set the size of a hosted Wpf User Control. But when the palette is docked Left and AutorollUp set to False there is a title bar on the upper part of the paletteSet, it looks like that the height of that TitleBar is not deduced from the Palette size itself in the PaletteSetSizeEventArgs passed with that event. I tried to get the avaiable inside space of the paletteset from the paletteSet.paletteSize property, but it is the same size that is passed in the PaletteSetSizeEventArgs. In that case the inside space is over estimated and the bottom part of the user control can not be seen.
Is there something i am misssing, or is there a way to get the height of the TitleBar to deduce it ?
Yvan Skific
http://linea-trace.blogspot.com/
PS: I noticed another issue with the width, when the palette is docked Bottom
PaletteSet.PaletteSize property gives you the size of the client area of the palette set. So you can resize your WPF control this way:
static void paletteSet_SizeChanged(object sender, PaletteSetSizeEventArgs e) { WpfCtrl.Width = e.Width; WpfCtrl.Height = e.Height; var ps = (PaletteSet) sender;
// ps.Size is the size of the palette set before resize. if (ps.DockEnabled == DockSides.Bottom || ps.DockEnabled == DockSides.Top) WpfCtrl.Width -= ps.Size.Width - ps.PaletteSize.Width; else if (ps.DockEnabled == DockSides.Left || ps.DockEnabled == DockSides.Right) WpfCtrl.Height -= ps.Size.Height - ps.PaletteSize.Height; }