using System; using System.Collections.Generic; using System.ComponentModel; using System.Drawing; using System.Data; using System.Linq; using System.Text; using System.Windows.Forms; using System.Windows.Forms.Integration; namespace TradeIdeas.TIProGUI.CBT { [ToolboxItem(false)] public partial class ConfigDemoEarningsDate : UserControl, IChild { const int DEFAULT_TABSHEET_HEIGHT = 250; const double RATIO = .93; //height of calendar grid divided by height of tabsheet public ConfigDemoEarningsDate(IContainer container) { InitializeComponent(); earningsDate2.setContainer(container); //Hosted WPF control } string IChild.Name { get { return "Calendar"; } } Control IChild.Body { get { return this; } } bool IChild.CanShowExample { get { return true; } } void IChild.OnShow() { } private void ConfigDemoEarningsDate_Resize(object sender, EventArgs e) { earningsDate2.resizeWPFElements(Height, RATIO,DEFAULT_TABSHEET_HEIGHT); //Height is that of ConfigDemoTabSheet } } }