public void AddTimelineBand(
int height,
bool isMain,
string srcType,
int columnsCount,
int eventSize
)
{
TimelineBand band;
RowDefinition rd;
band = new TimelineBand();
if (m_notifier != null)
{
m_notifier.AddElement(band);
}
band.IsMainBand = isMain;
band.ItemSourceType = srcType;
rd = new RowDefinition();
if (height > 0)
{
rd.Height = new GridLength((double)height);
band.Height = height;
}
else
{
rd.Height = new GridLength(1.0, GridUnitType.Star);
}
this.RowDefinitions.Add(rd);
band.SetValue(Grid.RowProperty, this.RowDefinitions.Count() - 1);
band.Margin = new Thickness(0.0);
band.TimelineWindowSize = columnsCount;
band.MaxEventHeight = eventSize;
band.TimelineTray = this;
if (band.IsMainBand)
{
m_mainBand = band;
}
m_bands.Add(band);
this.Children.Add(band);
}