File tree Expand file tree Collapse file tree 3 files changed +55
-1
lines changed Expand file tree Collapse file tree 3 files changed +55
-1
lines changed Original file line number Diff line number Diff line change 33 <startup >
44 <supportedRuntime version =" v4.0" sku =" .NETFramework,Version=v4.5" />
55 </startup >
6+ <runtime >
7+ <assemblyBinding xmlns =" urn:schemas-microsoft-com:asm.v1" >
8+ <dependentAssembly >
9+ <assemblyIdentity name =" Microsoft.VisualStudio.CoreUtility" publicKeyToken =" b03f5f7f11d50a3a" culture =" neutral" />
10+ <bindingRedirect oldVersion =" 10.0.0.0-11.0.0.0" newVersion =" 14.0.0.0" />
11+ </dependentAssembly >
12+ <dependentAssembly >
13+ <assemblyIdentity name =" Microsoft.VisualStudio.Editor" publicKeyToken =" b03f5f7f11d50a3a" culture =" neutral" />
14+ <bindingRedirect oldVersion =" 10.0.0.0-11.0.0.0" newVersion =" 14.0.0.0" />
15+ </dependentAssembly >
16+ <dependentAssembly >
17+ <assemblyIdentity name =" Microsoft.VisualStudio.Language.Intellisense" publicKeyToken =" b03f5f7f11d50a3a" culture =" neutral" />
18+ <bindingRedirect oldVersion =" 10.0.0.0-11.0.0.0" newVersion =" 14.0.0.0" />
19+ </dependentAssembly >
20+ <dependentAssembly >
21+ <assemblyIdentity name =" Microsoft.VisualStudio.Language.StandardClassification" publicKeyToken =" b03f5f7f11d50a3a" culture =" neutral" />
22+ <bindingRedirect oldVersion =" 10.0.0.0-11.0.0.0" newVersion =" 14.0.0.0" />
23+ </dependentAssembly >
24+ <dependentAssembly >
25+ <assemblyIdentity name =" Microsoft.VisualStudio.Text.Data" publicKeyToken =" b03f5f7f11d50a3a" culture =" neutral" />
26+ <bindingRedirect oldVersion =" 10.0.0.0-11.0.0.0" newVersion =" 14.0.0.0" />
27+ </dependentAssembly >
28+ <dependentAssembly >
29+ <assemblyIdentity name =" Microsoft.VisualStudio.Text.Logic" publicKeyToken =" b03f5f7f11d50a3a" culture =" neutral" />
30+ <bindingRedirect oldVersion =" 10.0.0.0-11.0.0.0" newVersion =" 14.0.0.0" />
31+ </dependentAssembly >
32+ <dependentAssembly >
33+ <assemblyIdentity name =" Microsoft.VisualStudio.Text.UI" publicKeyToken =" b03f5f7f11d50a3a" culture =" neutral" />
34+ <bindingRedirect oldVersion =" 10.0.0.0-11.0.0.0" newVersion =" 14.0.0.0" />
35+ </dependentAssembly >
36+ <dependentAssembly >
37+ <assemblyIdentity name =" Microsoft.VisualStudio.Text.UI.Wpf" publicKeyToken =" b03f5f7f11d50a3a" culture =" neutral" />
38+ <bindingRedirect oldVersion =" 10.0.0.0-11.0.0.0" newVersion =" 14.0.0.0" />
39+ </dependentAssembly >
40+ </assemblyBinding >
41+ </runtime >
42+
643</configuration >
Original file line number Diff line number Diff line change 9898 <ItemGroup >
9999 <None Include =" App.config" />
100100 </ItemGroup >
101+ <ItemGroup >
102+ <ProjectReference Include =" ..\EditorUtils\EditorUtils.csproj" >
103+ <Project >{fb418222-c105-4942-8eeb-832ddcffd89d}</Project >
104+ <Name >EditorUtils</Name >
105+ </ProjectReference >
106+ </ItemGroup >
101107 <Import Project =" $(MSBuildToolsPath)\Microsoft.CSharp.targets" />
102108 <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
103109 Other similar extension points exist, see Microsoft.Common.targets.
106112 <Target Name="AfterBuild">
107113 </Target>
108114 -->
109- </Project >
115+ </Project >
Original file line number Diff line number Diff line change 1212using System . Windows . Media . Imaging ;
1313using System . Windows . Navigation ;
1414using System . Windows . Shapes ;
15+ using EditorUtils ;
1516
1617namespace EditorApp
1718{
@@ -23,6 +24,16 @@ public partial class MainWindow : Window
2324 public MainWindow ( )
2425 {
2526 InitializeComponent ( ) ;
27+
28+ var editorHostFactory = new EditorHostFactory ( EditorVersion . Vs2015 ) ;
29+ var editorHost = editorHostFactory . CreateEditorHost ( ) ;
30+
31+ var textBuffer = editorHost . TextBufferFactoryService . CreateTextBuffer ( ) ;
32+ textBuffer . Insert ( 0 , "Hello Editor" ) ;
33+
34+ var wpfTextView = editorHost . TextEditorFactoryService . CreateTextView ( textBuffer ) ;
35+ var wpfTextViewHost = editorHost . TextEditorFactoryService . CreateTextViewHost ( wpfTextView , setFocus : true ) ;
36+ Content = wpfTextViewHost . HostControl ;
2637 }
2738 }
2839}
You can’t perform that action at this time.
0 commit comments