我遇到了一些问题,将CefSharp (WPF)嵌入到Revit的加载项中:
注意:在Revit之外,CEFSharp工作正常(尝试过MinimalExample.WPF)
发布于 2016-08-03 17:30:38
对于问题的第一部分,您需要订阅AppDomain.AssemblyResolve事件并将程序指向DLL文件的位置。另一种方法是使用IExternalApplication.OnStartup命令在Assembly.Load方法中手动加载DLL。
有关AssemblyResolve事件的更多信息,请参见此处:https://msdn.microsoft.com/en-us/library/system.appdomain.assemblyresolve(v=vs.110).aspx
发布于 2018-01-18 20:01:43
我只是做了同样的事情,而且效果很好
我在Revit2018中有一个可停靠的following (WPF),方法是在DockableDialogs 2018.2中遵循DockableDialogs示例
在这里找到的SDK:http://usa.autodesk.com/adsk/servlet/index?siteID=123112&id=2484975)
我目前使用的是CEFSharp.Wpf版本57.0.0.0
是的,你应该像这样重新映射Cef第三方:
CefSettings settings = new CefSettings(); settings.CachePath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), "CefSharp\\Cache"); string rootPath = FileUtility.GetAssemblyPath(); settings.BrowserSubprocessPath = Path.Combine(rootPath, "CefSharp.BrowserSubprocess.exe"); settings.LocalesDirPath = Path.Combine(rootPath, "locales"); settings.ResourcesDirPath = Path.Combine(rootPath); Cef.EnableHighDPISupport(); //settings.CefCommandLineArgs.Add("disable-gpu", "1"); Cef.Initialize(settings, performDependencyCheck: true, browserProcessHandler: null);
不要忘记调用Cef.Shutdown();最后也要调用
https://stackoverflow.com/questions/38748726
复制相似问题