Looking for tutorials for using WPF in VSTO
I need to create a very small add-in for MS Word 2007 which needs access to a database. I've read around the 'net that it is possible to write the usercontrol in WPF/C# (which would help me a lot) and host it inside a Winforms host.
But I need to get started - anyone know some good resources?
What I need information about:
- How to go about deploying the thing
- Requirements - can I use 3rd party dll's - do they need to be signed etc.
- Security - am I limited to sandboxed security? Do I need to go WCF or can I access an SQL s开发者_开发知识库erver directly?
- Getting started with the Word object model
Thanks in advance!
Yeah, totally. Did a bit of this myself a few months ago, albeit I didn't go to SQL directly (although I suppose it can be done). These two articles helped get me started:
- Build Office-Based Solutions Using WPF, WCF, And LINQ
- Using WPF With VSTO & Office 2007
Yes, you can do that.
How to go about deploying the thing
Any decent installer (Wise, installshield, etc) will do the trick. The built in install project in VS +kinda+ works, but you might run into limitiations.
Requirements - can I use 3rd party dll's - do they need to be signed etc.
Addins in Office under VSTO need to be signed, which means by definition, any references need to be signed.
Security - am I limited to sandboxed security? Do I need to go WCF or can I access an SQL server directly?
You can access SQL server directly from an office addin. No probs there.
Getting started with the Word object model
Whew! that's a tall order. best thing is to grab a sample VSTO Word addin to give you a framework, and then just start browsing the Word Object model in the Object explorer. Most of the objects are accessible from the root APPLICATION option via various collections. And most are named reasonably which makes entry into it fairly painless.
Don't have any books or such to recommend off hand. Google's been my friend in Word/Office dev.
精彩评论