Virtual techdays INDIA │ 22-24 Nov 2010 Developing Office Biz Application using WPF on Windows 7 Sarang Datye │ Sr. Consultant, Microsoft Sridhar Poduri.

Slides:



Advertisements
Similar presentations
Unit 1: Overview of the Microsoft.NET Platform
Advertisements

© Paradigm Publishing, Inc Excel 2013 Level 2 Unit 2Managing and Integrating Data and the Excel Environment Chapter 7Automating Repetitive Tasks.
Using Macros and Visual Basic for Applications (VBA) with Excel
© by Pearson Education, Inc. All Rights Reserved.
Visual Basic 2010 How to Program. © by Pearson Education, Inc. All Rights Reserved.2.
Visual Basic 2010 How to Program Reference: Instructor: Maysoon Bin Duwais slides Visual Basic 2010 how to program by Deitel © by Pearson Education,
Web Development in Microsoft Visual Studio Slide 2 Lecture Overview Introduce Visual Studio 2013 Create a first ASP.NET application.
Macros Tutorial Week 20. Objectives By the end of this tutorial you should understand how to: Create macros Assign macros to events Associate macros with.
Chapter 2: The Visual Studio.NET Development Environment Visual Basic.NET Programming: From Problem Analysis to Program Design.
It’s always better live. MSDN Events Developer Productivity Improvements with Visual Studio 2008 and Office Business Applications.
Working with SharePoint Document Libraries. What are document libraries? Document libraries are collections of files that you can share with team members.
Developing for the Microsoft Office System Jay Schmelzer Group Program Manager – Visual Studio.
Microsoft Visual Basic 2005 ENRICHMENT CHAPTER Visual Studio Tools for Office.
Microsoft Visual Basic 2005 CHAPTER 8 Using Procedures and Exception Handling.
Create Professional-looking Content Easy to Use Interface Share Documents.
Neal Stublen Practice Solution  Create a new solution  Add a WinForms project  Add a Class Library project  Reference the library.
.NET SIG Presentation on Visual Studio Tools for Office – A Primer by Anthony Maimone & Ted Ogrean.
McGraw-Hill© 2007 The McGraw-Hill Companies, Inc. All rights reserved. 1-1.
Hands-on Introduction to Visual Basic.NET Programming Right from the Start with Visual Basic.NET 1/e 6.
Tutorial: Introduction to ASP.NET Internet Technologies and Web Application 4 th February 2010.
Microsoft Visual Basic 2012 Using Procedures and Exception Handling CHAPTER SEVEN.
NOTE: To change the image on this slide, select the picture and delete it. Then click the Pictures icon in the placeholder to insert your own image. WEB.
Understanding Code Compilation and Deployment Lesson 4.
© 2008 The McGraw-Hill Companies, Inc. All rights reserved. WORD 2007 M I C R O S O F T ® THE PROFESSIONAL APPROACH S E R I E S Lesson 22 Macros.
Microsoft Confidential Office as a Development Platform Tim Heuer
Lesson 1: Getting Started
Using the Actions Pane, Host Controls, and Smart Tags
Microsoft Visual Basic 2008 CHAPTER 8 Using Procedures and Exception Handling.
IE 411/511: Visual Programming for Industrial Applications
Multiple Forms, Container Controls, AddHandler This presentation is based on the Forms and ContainerControls VB Projects 1.
Todd Kitta  Covenant Technology Partners  Professional Windows Workflow Foundation.
ADD-IN EXPRESS True RAD tools for Microsoft Office developers.
Lecture Set 1 Part C: Understanding Visual Studio and.NET – Applications, Solutions, Projects (no longer used – embedded in Lecture Set 2A)
NOTE: To change the image on this slide, select the picture and delete it. Then click the Pictures icon in the placeholder to insert your own image. WEB.
Microsoft Visual Basic 2005 ENRICHMENT CHAPTER Visual Studio Tools for Office.
Chapter One An Introduction to Visual Basic 2010 Programming with Microsoft Visual Basic th Edition.
Lecture Set 2 Part A: Creating an Application with Visual Studio – Solutions, Projects, Files.
Microsoft Office Outlook 2013 Microsoft Office Outlook 2013 Courseware # 3252 Lesson 6: Organizing Information.
© 2008 The McGraw-Hill Companies, Inc. All rights reserved. WORD 2007 M I C R O S O F T ® THE PROFESSIONAL APPROACH S E R I E S Lesson 13 Templates.
Visual Basic.NET BASICS Lesson 1 A First Look at Microsoft Visual Basic.NET.
Microsoft Visual Basic 2005 BASICS Lesson 1 A First Look at Microsoft Visual Basic.
® Microsoft Access 2010 Tutorial 10 Automating Tasks with Macros.
Chapter 2: Excel Basics and Formatting Spreadsheet-Based Decision Support Systems Prof. Name Position (123) University Name.
ADD-IN EXPRESS World-class Office extensions with little coding.
Olaf Feldkamp Developer Platform Advisor Microsoft Switzerland blogs.msdn.com/swiss_dpe_team.
Extending the 2007 Microsoft Office System User Interface Mike Taulty Developer & Platform Group, Microsoft Ltd
Microsoft Visual Studio 2005 Tools for the Office System: Building Office Solutions Using Visual Studio 2005 Tools for Office Andrew Coates Developer Evangelist.
Lecture Set 2 Part A: Creating an Application with Visual Studio – Solutions, Projects, Files 8/10/ :35 PM.
COMPUTER PROGRAMMING I 3.01 Apply Controls Associated With Visual Studio Form.
Arun Prakash Ganesan Development Lead Microsoft Corporation Office 2007 for Developers.
The Office Development Platform & Visual Studio Tools for Office Mike Hernandez Product Manager Microsoft Corporation Steven Goulet Group Program Manager.
COMPUTER PROGRAMMING I 3.01 Apply Controls Associated With Visual Studio Form.
Workflow in Microsoft Office SharePoint Server Jessica Gruber Consultant Microsoft Corporation.
Pranav Ainavolu VSTO Developer, Conrep Solutions |
Chapter 2: The Visual Studio.NET Development Environment Visual Basic.NET Programming: From Problem Analysis to Program Design.
Dive Into® Visual Basic 2010 Express
Chapter 2: The Visual Studio .NET Development Environment
5/20/2018 2:53 AM © 2006 Microsoft Corporation. All rights reserved.
Chapter 1: An Introduction to Visual Basic 2015
Office 2010 UI Customization
Office 365 Development July 2014.
3.01 Apply Controls Associated With Visual Studio Form
Visual Studio Tools for Office 2005
3.01 Apply Controls Associated With Visual Studio Form
Using Procedures and Exception Handling
Hands-on Introduction to Visual Basic .NET
Office as a development platform with Visual Studio 2008
Overview of the IDE Visual Studio .NET is Microsoft’s Integrated Development Environment (IDE) for creating, running and debugging programs (also.
Windows Forms in Visual Studio 2005: An in-depth look at key features
Contexualized Data In Document Authoring
Presentation transcript:

virtual techdays INDIA │ Nov 2010 Developing Office Biz Application using WPF on Windows 7 Sarang Datye │ Sr. Consultant, Microsoft Sridhar Poduri │ Consultant, Microsoft

virtual techdays  Introduction  Application – Level Add-ins  VSTO 4 Framework  How the Office app loads the Add-in  Customizing the Office Ribbon  Custom Task Panes in Office  Using WPF Controls in Office Solutions S E S S I O N A G E N D A

virtual techdays Prerequisites Office 2007 SP2/Office 2010 Windows 7.net framework 4 The Visual Studio 2010 Tools for Office Runtime.

virtual techdays Introduction Visual Studio provides the following types of project templates for Office development: – Document-level customizations. This type of solution is associated with a specific document. – Application-level add-ins. This type of solution is associated with the application itself. To decide which of these project types is best for your solution, think about whether you want your code to run only when a specific document is open, or whether you want the code to be available whenever the application is running. We will focus on Application-level add-in development in our session today.

virtual techdays Application-Level Add-Ins Application-level add-ins consist of an assembly that is associated with a Microsoft Office application. Visual Studio includes tools to help you create add-ins. Add-in projects include an automatically generated class that represents the add-in. This class provides properties and events you can use to access the object model of the host application and run code when the add-in is loaded and shut down.

virtual techdays VSTO and.net framework

virtual techdays How the Office App loads the Add-in

virtual techdays Optional slide The following steps occur when a user starts an application: The application checks the registry for entries that identify add-ins that were created by using the Office developer tools in Visual Studio. If the application finds these registry entries, the application loads VSTOEE.dll, which loads VSTOLoader.dll. These are unmanaged DLLs that are the loader components for the Visual Studio 2010 Tools for Office Runtime. For more information, see Visual Studio Tools for Office Runtime Overview.Visual Studio Tools for Office Runtime Overview VSTOLoader.dll loads the.NET Framework and starts the managed portion of the Visual Studio Tools for Office runtime. The Visual Studio Tools for Office runtime checks for manifest updates, and downloads the most recent application and deployment manifests. The Visual Studio Tools for Office runtime performs a series of security checks. For more information, see Securing Office Solutions.Securing Office Solutions If the add-in is trusted to run, the Visual Studio Tools for Office runtime uses the deployment manifest and application manifest to check for assembly updates. If a new version of the assembly is available, the runtime downloads the new version of the assembly to the ClickOnce cache on the client computer. For more information, see Deploying Office Solutions.Deploying Office Solutions The Visual Studio Tools for Office runtime creates a new application domain in which to load the add-in assembly. The Visual Studio Tools for Office runtime loads the add-in assembly into the application domain. The Visual Studio Tools for Office runtime calls the RequestComAddInAutomationService method in your add-in, if you have overridden it.RequestComAddInAutomationService You can optionally override this method to expose an object in your add-in to other Microsoft Office solutions. For more information, see Calling Code in Application-Level Add-ins from Other Office Solutions.Calling Code in Application-Level Add-ins from Other Office Solutions The Visual Studio Tools for Office runtime calls the RequestService method in your add-in, if you have overridden it.RequestService You can optionally override this method to extend a Microsoft Office feature by returning an object that implements an extensibility interface. For more information, see Customizing UI Features By Using Extensibility Interfaces.Customizing UI Features By Using Extensibility Interfaces

virtual techdays Customizing the Office Ribbon To add a Ribbon to a project – On the Project Menu, click Add New Item. – In the Add New Item dialog box, select Ribbon (Visual Designer) or Ribbon (XML). For more information about these templates, see Ribbon Overview.Ribbon Overview – In the Name box, type a name for the Ribbon item. Click OK. Handling Events and Setting Properties – The Ribbon Designer enables you to set control properties at design time by using the Properties window. In addition, the Ribbon exposes a strongly typed object model that you can use to get and set the properties of Ribbon controls at run time. – You can double-click any control on the designer to open an event handler for the control's default event. You can create event handlers for all other control events by using the Properties window. – Ribbon events and properties are located in the Microsoft.Office.Tools.Ribbon namespace. The Ribbon (Visual Designer) item automatically adds a reference to this assembly in the project and inserts the appropriate using or Imports statement at the top of the Ribbon code file.Microsoft.Office.Tools.Ribbon

virtual techdays DEMO: Customizing Ribbon in Office

virtual techdays Custom Task-panes in Office Custom Task Panes Overview – Task panes are user interface panels that are typically docked to one side of a window in a Microsoft Office application. Custom task panes give you a way to create your own task pane and provide users with a familiar interface to access your solution's features. For example, the interface can contain controls that run code to modify documents or display data from a data source. Benefits of Custom Task Panes Custom task panes let you integrate your features into a familiar user interface. You can create a custom task pane quickly by using Visual Studio tools. – Familiar User Interface Users of applications in the Microsoft Office system are already familiar with using task panes such as the Styles and Formatting task pane in Word. Custom task panes behave like other task panes in the Microsoft Office system. Users can dock custom task panes to different sides of the application window, or they can drag custom task panes to any location in the window. You can create an add-in that displays multiple custom task panes at the same time, and users can control each task pane individually. – Windows Forms Support The user interface of a custom task pane that you create by using the Office development tools in Visual Studio is based on Windows Forms controls. You can use the familiar Windows Forms Designer to design the user interface for a custom task pane. You can also use the data binding support in Windows Forms to bind a data source to controls on the task pane. Creating a Custom Task Pane You can create a basic custom task pane in two steps: Create a user interface for your custom task pane by adding Windows Forms controls to a UserControl object. UserControl Instantiate the custom task pane by passing the user control to the CustomTaskPaneCollection object in your add-in. This collection returns a new CustomTaskPane object that you can use to modify the appearance of the task pane and respond to user events.CustomTaskPaneCollectionCustomTaskPane

virtual techdays Custom Task Panes in Office You can add a custom task pane to the applications listed above by using an application-level add-in. To add a custom task pane to an application – Open or create an application-level project for one of the applications listed above. – On the Project menu, click Add User Control. – In the Add New Item dialog box, change the name of the new user control to MyUserControl, and then click Add. – The user control opens in the designer. – Add one or more Windows Forms controls from the Toolbox to the user control. – Open the ThisAddIn.cs or ThisAddIn.vb code file. – Add code to the ThisAddIn class. private MyUserControl myUserControl1; private Microsoft.Office.Tools.CustomTaskPane myCustomTaskPane; – Add the following code to the ThisAddIn_Startup event handler myUserControl1 = new MyUserControl(); myCustomTaskPane = this.CustomTaskPanes.Add(myUserControl1, "My Task Pane"); myCustomTaskPane.Visible = true;

virtual techdays DEMO: Custom Task Panes in Office

virtual techdays Using WPF Controls in Office Solutions Adding WPF Controls to Office Projects at Design Time – You cannot add WPF controls directly to UI elements in Office solutions. Instead, add a User Control (Winforms) item to your project, and use it as the design surface for WPF controls. Then, add the WPF user control to a UI element in your project. To add WPF controls to an actions pane, custom task pane, or form region – Open a project to which you want to add a custom task pane, an actions pane, or a form region. – Add a User Control (Winforms) item to your project. – From the Toolbox, add WPF controls to the WPF user control design surface. – By default, when the WPF user control designer is open, the Toolbox contains only WPF controls. – Build the project. – Add an actions pane, form region, or custom task pane to your project: – For form regions, add an Outlook Form Region item to the project. – For actions panes, add an Actions Pane Control or User Control item to the project. – For custom task panes, add a User Control item to the project. – From the ProjectName WPF User Controls tab of the Toolbox, drag the WPF user control to the designer for the actions pane, form region, or custom task pane. – Visual Studio automatically creates an ElementHost object that hosts the WPF user control on the UI element.ElementHost – Rebuild the project.

virtual techdays Using WPF – contd… Hosting WPF Controls by Using the ElementHost Class – Visual Studio provides features that help you use Windows Forms controls in your Office solutions, but it does not provide similar features for WPF controls. For example, you can add Windows Forms controls to documents and worksheets at design time by dragging controls from the Toolbox, or at run time by using helper methods. However, these tools are not available for WPF controls. – WPF controls use the ElementHost class as an integration layer between a Windows Forms control or form and the WPF controls. When you add WPF controls to your solution at design time, Visual Studio automatically generates an ElementHost object for you.ElementHost

virtual techdays DEMO: WPF Controls in Office

virtual techdays │ │