【c# – 使用Silverlight 4中的ComAutomationFactory对Word文档字段进行迭代】教程文章相关的互联网学习教程文章

通过JavaScript迭代Silverlight Dictionary吗?【代码】

我正在尝试从JavaScript访问Silverlight字典.如here所述,Silverlight为Dictionary类型创建了一个包装器,可以通过JavaScript访问它.function MyFunction(dictionary) {// This works okay...alert(dictionary["someKey"]); }但是,在我的情况下,我不知道字典中实际上有哪些键.但是,MSDN页面似乎没有描述任何访问此信息的方法.我试过了:function MyFunction(dictionary) {for (var item in dictionary){// Do stuffalert(item);} }然...

c# – 使用Silverlight 4中的ComAutomationFactory对Word文档字段进行迭代【代码】

更新:这是Silverlight 4测试版中确认的错误. http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=523052 我通过切换到完整的WPF应用程序并使用常规的旧Microsoft.Office.Interop.Word解决了这个问题.但我仍然对使用ComAutomationFactory的动态值如何使其工作非常感兴趣. 这可能更像是一个C#4.0问题,但我想要做的是利用受信任的SL4应用程序中的ComAutomationFactory类来加载Word文档,更改一些文本并...