private Button addButton(string text, Action action) { return this.Add<Button>(x => { x.VerticalAlignment = VerticalAlignment.Stretch; x.Content = text; x.Click += action.ToRoutedHandler(); x.Height = 30; x.Margin = new Thickness(5, 0, 5, 0); x.HorizontalAlignment = HorizontalAlignment.Right; }); }
public TabCloser(Action action) : this() { link.Click += action.ToRoutedHandler(); }