Vb.net 如何在Eyeshot 12中创建多个工具栏?

Vb.net 如何在Eyeshot 12中创建多个工具栏?,vb.net,eyeshot,Vb.net,Eyeshot,我想做第二个垂直工具栏 我尝试使用此代码,但我可以看到任何结果 Dim buttons2 As ToolBarButton() = New ToolBarButton(1) {} Dim bmp1 As Bitmap = My.Resources.Bitmap1 buttons2(0) = New devDept.Eyeshot.ToolBarButton(bmp1, "Something", "Something", devDept.Eyeshot.ToolBarButton.styleTyp

我想做第二个垂直工具栏

我尝试使用此代码,但我可以看到任何结果

Dim buttons2 As ToolBarButton() = New ToolBarButton(1) {}
Dim bmp1 As Bitmap = My.Resources.Bitmap1
buttons2(0) = New devDept.Eyeshot.ToolBarButton(bmp1, "Something", "Something", devDept.Eyeshot.ToolBarButton.styleType.PushButton, True)

Dim bmp2 As Bitmap = My.Resources.Bitmap2
buttons2(1) = New devDept.Eyeshot.ToolBarButton(bmp2, "Something more", "Something more", devDept.Eyeshot.ToolBarButton.styleType.PushButton, True)

Dim tb As ToolBar = New ToolBar(ToolBar.positionType.VerticalMiddleLeft, True, buttons2)

如果要在Eyeshot(而非设计模式)中添加新工具栏,请执行以下操作:

创建一个新的工具栏 将此新工具栏添加到环境中。OsservableCollection 调用方法Environment.CompileUserInterfaceElements C WPF中的代码片段:

ToolBarButton toolBarButton = new ToolBarButton(buttonImage, "spongeBob", "spongeBob", ToolBarButton.styleType.PushButton, true);

ObservableCollection<ToolBarButton> toolBarButtons = new ObservableCollection<ToolBarButton>() { toolBarButton };

ToolBar toolBar = new ToolBar(ToolBar.positionType.VerticalMiddleLeft, true, toolBarButtons);
model1.GetToolBars().Add(toolBar);
model1.CompileUserInterfaceElements();

如何将工具栏添加到ViewportLayout?您是否尝试过在设计模式下在控件中添加工具栏,并改用可见性?就我个人而言,我有很多工具栏,我只是创建了动态填充的空工具栏。