이 기능은 단순히 WPF 프로젝트에서 사용할 수없는 것 같습니다. 작동하고 작동하지 않을 때 Silverlight 프로젝트에서만 작동합니다. 그러나 "Open Expression Blend ..."는 매우 복잡하지 않으므로 Visual Studio 매크로를 사용하면됩니다.
Public Sub OpenInExpressionBlend()
Dim blendPath As String = Nothing
Dim key As String = "SOFTWARE\Microsoft\Expression\Blend\VS"
Dim registryKey As Microsoft.Win32.RegistryKey = Microsoft.Win32.Registry.LocalMachine.OpenSubKey(key)
If Not registryKey Is Nothing Then
blendPath = registryKey.GetValue("BlendLaunchPath")
registryKey.Close()
End If
If blendPath Is Nothing Then
MsgBox("Cannot find Blend", MsgBoxStyle.Exclamation, "Open in Expression Blend")
Return
End If
If DTE.SelectedItems.Count <> 1 Then
MsgBox("Not just one item selected", MsgBoxStyle.Exclamation, "Open in Expression Blend")
Return
End If
Dim item As SelectedItem = DTE.SelectedItems.Item(1)
If Not TypeOf item.ProjectItem Is ProjectItem Then
MsgBox("Not a project item", MsgBoxStyle.Exclamation, "Open in Expression Blend")
Return
End If
Dim projectItem As ProjectItem = item.ProjectItem
Dim project As Project = projectItem.ContainingProject
Dim file As String = projectItem.Name
If file.Substring(file.Length - 5) <> ".xaml" Then
MsgBox("Not a xaml file", MsgBoxStyle.Exclamation, "Open in Expression Blend")
Return
End If
While TypeOf projectItem.Collection.Parent Is ProjectItem
projectItem = CType(projectItem.Collection.Parent, ProjectItem)
file = projectItem.Name & "\" & file
End While
file = """" & file & """"
Dim projectPath As String = """" & project.FullName & """"
Dim blendArgs As String = projectPath & " /file:" & file
Dim process As System.Diagnostics.Process = New System.Diagnostics.Process()
& blendArgs) Process.Start를 (blendPath, blendArgs) 최종 하위
업데이트 :
이를 사용하려면 매크로 IDE를 사용하여 매크로를 추가 한 다음 프로젝트에 추가 다음과 같은 항목 컨텍스트 메뉴 :
도구 -> 사용자 정의 -> 명령 -> 컨텍스트 메뉴 : 프로젝트 및 솔루션 컨텍스트 메뉴 | 아이템 -> 명령을 추가 ... -> 카테고리 : 매크로 -> 명령 : Macros.MyMacros.Personal.OpenInExpressionBlend ->
선택 사항 수정 확인 -> 이름 : Open in Expression Blend를 ...
아래로 이동 : (아래에서 이동 ...)
참고 : 명령은 추가 한 모듈에 따라 다릅니다.
사람들에게 이메일로 답장을 보내지 마십시오. 여기에 질문을 게시하면 사람들이 여기에 답합니다. 그렇게하면 모든 사람에게 유용합니다. –