2010-12-27 2 views
1

문제가 있습니다. WPF 프로젝트를 만들고 " expression blend"에서 링크를 보려면 - Silverlight 프로젝트처럼 보이지 않습니다. 나는 "open with"링크를 사용하여 블렌드에 액세스하고 그 블렌드를 열고 거기에서 작업 할 수 있습니다. (그게 바로 입니다.) 그러나 인터넷 검색에서 wff 프로젝트와 함께 " 블렌드를 열어"볼 수 있도록 표현식 혼합을 시각적 스튜디오 (그 반대가 아닌) 전에 설치해야한다는 것을 알게되었습니다. 이것은 Window 7 x64 OS 및 x32 OS에서 발생합니다. 나 또한 "regedit"로 작업 할 때 x64와 x32가 표현식 블렌드와 관련하여 다르게 설정된다는 것을 알았습니다.WPF 프로젝트에서 "Open in Expression Blend ..."가 누락되었습니다.

누군가이 문제를 해결하는 데 도움을주십시오.

+0

사람들에게 이메일로 답장을 보내지 마십시오. 여기에 질문을 게시하면 사람들이 여기에 답합니다. 그렇게하면 모든 사람에게 유용합니다. –

답변

2

이 기능은 단순히 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를 ...

아래로 이동 : (아래에서 이동 ...)

참고 : 명령은 추가 한 모듈에 따라 다릅니다.

관련 문제