You can create a new Visual Studio extension which adds a new menu, or a new toolbar, or a new button to an existing window. Then using IDesignerHost and INestedContainer, get the selectable components, and filter them to get list of buttons, then using ISelectionService select them.
You can find all the building blocks of the solution here and there, for example in my following posts:
But to keep it simple to use and simple for test, I'll use a different solution that I used here, which is adding a new designer verb to context menu, using a base class.

To do so, Create a BaseForm class deriving from Form. Then each form which drives from this class will have above functionality that you see in the animation. Here is the code of the base form:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.Design;
using System.Linq;
using System.Windows.Forms;
using System.Windows.Forms.Design;
public partial class BaseForm : Form
{
protected override void OnHandleCreated(EventArgs e)
{
base.OnHandleCreated(e);
if (DesignMode && Site != null)
{
var host = Site.GetService(typeof(IDesignerHost)) as IDesignerHost;
if (host != null)
{
var designer = (DocumentDesigner)host.GetDesigner(this);
if (designer != null)
{
designer.ActionLists.Clear();
designer.ActionLists.Add(
new MyActionList(host, designer));
}
}
}
}
public class MyActionList : DesignerActionList
{
IDesignerHost host;
ControlDesigner designer;
public MyActionList(IDesignerHost host,
ControlDesigner designer) : base(designer.Component)
{
this.host = host;
this.designer = designer;
}
private void SelectAllButtons()
{
var buttons = GetSelectableComponents(host).OfType<Button>().ToList();
var svc = host.GetService(typeof(ISelectionService)) as ISelectionService;
if (svc != null)
{
svc.SetSelectedComponents(buttons);
}
}
public override DesignerActionItemCollection GetSortedActionItems()
{
var items = new DesignerActionItemCollection();
var category = "New Actions";
items.Add(new DesignerActionMethodItem(this, "SelectAllButtons",
"Select all buttons", category, true));
return items;
}
private List<IComponent> GetSelectableComponents(IDesignerHost host)
{
var components = host.Container.Components;
var list = new List<IComponent>();
foreach (IComponent c in components)
list.Add(c);
for (var i = 0; i < list.Count; ++i)
{
var component1 = list[i];
if (component1.Site != null)
{
var service = (INestedContainer)component1.Site.GetService(
typeof(INestedContainer));
if (service != null && service.Components.Count > 0)
{
foreach (IComponent component2 in service.Components)
{
if (!list.Contains(component2))
list.Add(component2);
}
}
}
}
return list;
}
}
}