public void AddCommand(string text, ICommand command, Icon icon) { var button = new CommandButton(icon, text, command); Children.Add(button); //this.Add<Button>(x => //{ // x.ToIconButton(icon, command).Text(text); // x.VerticalAlignment = VerticalAlignment.Stretch; // x.Height = 30; // x.Margin = new Thickness(5, 0, 5, 0); // x.HorizontalAlignment = HorizontalAlignment.Right; //}); }