2012-03-25 1 views
1

Visual Studio 2010 추가 기능을 구축하고 있습니다. 제가하고 싶은 것들 중 하나는 문서의 수직 분할 뷰를 호출하는 것입니다. VSX GUI에서 Window -> New Window 다음에 Window -> New Vertical Tab Group을 선택하여이 작업을 수행 할 수 있습니다.VS2010 추가 기능에서 "새 세로 탭 그룹"을 호출하려면 어떻게합니까?

Visual Studio 추가 기능에서 동일한 비헤이비어를 호출하려면 어떻게해야합니까?

답변

1

당신은 ExecCommand

public void Exec(string commandName, vsCommandExecOption executeOption, ref object varIn, ref object varOut, ref bool handled) 
    { 
     handled = false; 
     if(executeOption == vsCommandExecOption.vsCommandExecOptionDoDefault) 
     { 
      if(commandName == "MyAddin1.Connect.MyAddin1") 
      { 
       //_applicationObject.ActiveWindow.WindowState. 
       _applicationObject.ExecuteCommand("Window.NewWindow"); 
       _applicationObject.ExecuteCommand("Window.NewVerticalTabGroup"); 
       handled = true; 
       return; 
      } 
     } 
    } 
+0

주셔서 감사합니다, 이것은 훌륭하게 작동 사용할 수 있습니다! –

관련 문제