Hi,
I'm hosting a WPF chart in an Excel 2003 ActionsPane. The chart is set to stretch both horizontally and vertically, however, although the ElementHost and the chart fill the ActionsPane horizontally, I have not found a way to enable the ElementHost to fill vertically. The only property that seems to have any affect on the layout of the ElementHost is the Height and Size properties. Anchor, Dock, AutoSize don't seem to effect the layout either on the ActionsPane object or the ElementHost object.
Am I missing something?
regards,
Danny
// A snippet from ThisWorkbook.cs
public partial class ThisWorkbook
{
private void ThisWorkbook_Startup(object sender, System.EventArgs e)
{
var ap = Globals.ThisWorkbook.ActionsPane;
ap.Clear();
ap.Visible = true;
var plotControl1 = new Swordfish.WPF.Charts.TestPage();
var elementHost1 = new System.Windows.Forms.Integration.ElementHost();
elementHost1.AutoSize = true; // Doesn't seem to have an effect.
elementHost1.Child = plotControl1;
ap.Controls.Add(elementHost1);
}