GithubHelp home page GithubHelp logo

linecode / vstocontrib Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jakeginnivan/vstocontrib

0.0 2.0 0.0 15.76 MB

VSTO Contrib lets you easily unit test, use IoC/DI and develop in a MVVM style within Office Add-ins. It supports Outlook, Word, Excel and PowerPoint 2007 or 2010, and has both .net 3.5 and 4.0 builds

License: MIT License

Batchfile 0.01% C# 94.48% PowerShell 0.22% XSLT 5.29%

vstocontrib's Introduction

VSTOContrib

VSTO Contrib is all about making VSTO development better for developers. It allows you to separate your concerns, use IoC and write more testable clean code in your VSTO add-ins.

Getting Started

A getting started video is available at http://youtu.be/TxRjNsaVX6U, it goes through quite a few of the concepts in VSTO Contrib to help you get started

If you just want to dive in, install VSTOContrib.<OfficeProduct> from nuget, for example VSTOContrib.Outlook for an outlook package.

Included in the package is a readme with some code snippets to help you get started. Also check out the sample projects in this repo, there is a simple one for each of the Office applications and will help you get started

Features

Simplified Model

VSTO Contrib makes it easier to deal with things like:

  • Automatically registering your custom task panes for new windows
  • Keeping ribbon controls in sync across windows
  • Keeping custom task pane state in sync across windows (size, visibility etc)
  • Allow your code to be contextually aware, for example in work, you know the current window and the document when the user clicks on a ribbon button

VSTO Contrib allows you to create a 'ViewModel' for a particular ribbon type, and you will get a new instance of your view model for each context (document, spreadsheet, mailitem etc).

Convention over configuration

Your Ribbon XML will be discovered based on your ViewModels name, it will automatically be discovered and given to VSTO on demand.

The default convention can be overridden by providing your own IViewLocationStrategy

More powerful ribbon XML

Ribbon XML give you a lot more power and flexibility than the VSTO Designer, at the expense of lack of context. VSTO Contrib makes sure you have the current window, the context (document, worksheet etc), ribbon all available to you.

Centralised error handling

Got try/catch's around every method in your add-in? VSTO Contrib allows you to write your own custom IErrorHandler which gives you a central place to handle the errors and stop them getting to Office.

IoC Container Support

VSTO Contrib has full support for IoC containers, there is currently only an Autofac NuGet package, but it is easy to write a simple adapter to any container!

Samples

There are sample applications for Word, Excel, PowerPoint and Outlook available at https://github.com/JakeGinnivan/VSTOContrib/tree/master/src/Samples, check them out and if there are more scenarios which you would like to see covered raise an issue

Each sample is a bit different and VSTO Contrib's model is exactly the same for all Office apps, so the concepts from one sample will apply to other Office Apps!

vstocontrib's People

Contributors

0xced avatar jakeginnivan avatar jpeterson-isdc avatar ppiotrowicz avatar rmorlok avatar roxberry avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.