惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

美团技术团队
T
The Blog of Author Tim Ferriss
月光博客
月光博客
阮一峰的网络日志
阮一峰的网络日志
Engineering at Meta
Engineering at Meta
量子位
I
InfoQ
Jina AI
Jina AI
Microsoft Security Blog
Microsoft Security Blog
H
Help Net Security
H
Hackread – Cybersecurity News, Data Breaches, AI and More
G
Google Developers Blog
J
Java Code Geeks
Recent Announcements
Recent Announcements
aimingoo的专栏
aimingoo的专栏
小众软件
小众软件
V
V2EX
腾讯CDC
P
Proofpoint News Feed
A
About on SuperTechFans
爱范儿
爱范儿
U
Unit 42
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
Last Week in AI
Last Week in AI

博客园 - Dragon-China

JS实现显示倒影的图片展示特效之改变图片显示大小 转:如何用C#获得文件信息以及扩展信息 C#制作WinForm控件 InfoPath: Passing Command Line parameters to a new form Office 2003 主 Interop 程序集的安装和使用 .NET 反编译工具及其插件 Extensible OLE Property Pages in .NET COM组件设计与应用之GUID和接口 用C#创建COM对象 ActiveX and Com Infopath中,自己编写的ActiveX控件,为何不能绑定数据到XML属性节点 一位软件工程师的6年总结本人读了深受启发,献给所有从事IT开发的人[转贴] InfoPath 的自动化和扩展 创建可绑定到 InfoPath 表单数据的 ActiveX 控件 Extending the InfoPath control set with custom controls InfoPath2007 开发人员的新增功能 ActiveX控件和它的容器 值得推荐的Infopath开发例子和资料 Custom Control support in InfoPath
在Infopath中使用自定义控件不能激发 OnPropertyChange 事件
Dragon-China · 2007-11-01 · via 博客园 - Dragon-China

InfoPath has a really powerful feature to allow users to create their own custom controls for InfoPath forms using Microsoft's ActiveX technology. One requirement that is essential for controls to work as expected in InfoPath is that the controls must fire OnPropertyChange Notifications so that InfoPath knows to grab the information and copy it into the XML DOM. The unfortunate thing is that there are some already built controls which don't fire OnPropertyChange Notifications but they would be incredibly useful in an InfoPath form.

Here's what to do if you want to use these types of controls. InfoPath will grab the value before you save, so if you don't need other parts of the form to interact with the data from the ActiveX control, then you don't really need to do anything. Your data from the ActiveX control will always get saved.

If you do need to pull data from the ActiveX control before it is saved (maybe for example on a OnAfterChange or a button click), you should call XDocument.ForceUpdate(); before grabbing the value. This will cause InfoPath to query the ActiveX control for the value and place it into the XML DOM so then your business logic will be able to get the correct value.

from:

http://blogs.msdn.com/infopath/archive/2004/04/30/123946.aspx