public void Add(KeyFrame kf) { KeyFrameTray f = new KeyFrameTray(kf, s); frames.AddLast(f); addToGrid(frames.Count - 1, f); }
private void addToGrid(int i, KeyFrameTray f) { var d = new RowDefinition(); d.Height = new GridLength(f.Height); grid.RowDefinitions.Add(d); grid.Children.Add(f); Grid.SetRow(f, i); }