public static SampleBox Create(string filename) { SampleBox box = new SampleBox(); box.Width = 290; box.Height = 32; box.Margin = new Thickness(0, 0, 0, 10); box.BindWithFile(filename); return(box); }
void AddSample(string file) { SampleBoxesPanel.Children.Add(SampleBox.Create(file)); CheckSamples(); }