Exemplo n.º 1
0
 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;
     });
 }
Exemplo n.º 2
0
 public TabCloser(Action action)
     : this()
 {
     link.Click += action.ToRoutedHandler();
 }