Presentation is loading. Please wait.

Presentation is loading. Please wait.

VSTO Day ActionsPane e la gestione dei dati Gianluca Ciocci

Similar presentations


Presentation on theme: "VSTO Day ActionsPane e la gestione dei dati Gianluca Ciocci"— Presentation transcript:

1 VSTO Day ActionsPane e la gestione dei dati Gianluca Ciocci

2 Agenda ActionsPaneSmartTags Data and Data Binding

3 ActionsPane è limplementazione dellinterfaccia ISmartDocument (VSTO2005 Vers.) Utilizzo semplificato da parte di uno sviluppatore Accesso OM ancora più semplice. Estende lOffice Document Actions Task Pane Document-level control Completo supporto a controlli anche custom Sensibile al contesto

4 ActionsPane

5 ActionsPane – Dev Experience 1. Design a UserControl 2. Add control behaviour 3. Add the control to the ActionsPane

6 ActionsPane – StackOrder None FromLeft FromBottom FromTop FromRight ActionsPane.StackOrder = Microsoft.Office.Tools.StackStyle....;

7 ActionsPane – Orientation Office.CommandBar ap = Globals.ThisWorkbook.Application.CommandBars["Task Pane"]; ap.Position = Office.MsoBarPosition....; msoBarRight msoBarTop msoBarBottom msoBarLeft

8 ActionsPane – Scrolling Autoscrolling Verticale abilitato Proprietà scrolling ActionsPane.VerticalScrollActionsPane.HorizontalScroll

9 ActionsPane – Architecture Office Document Actions Task Pane VSTO Invisible ActiveX Control WinForms UserControl (ActionsPane) ActionsPane. Controls

10 demo ActionsPane

11 ActionsPane – Dinamic context 1. Design multiple UserControls 2. Map XML schema 3. Code UserControl behaviour

12 ActionsPane – Dinamic context 4. Instantiate UserControls 5. Hook up handlers for Node navigation events 6. Code event handlers to add/remove UserControls

13 demo Dinamic ActionsPane

14 SmartTags Mappano delle azioni su termini specifici, contenuti in un documento Custom Recognizers Custom Actions VSTO 2005: sviluppo di smart tag enormemente semplificato Terms e Regular expressions + Action per un singolo smart tag

15 SmartTags – User experience

16 SmartTags – Developer experience

17 demo VSTO SmartTags

18 SmartTags – Custom recognizer 1.Import Smart Tags 2.0 Library 2. Inherits SmartTag Class 3. Implement base constructor 4. Override the Recognize method Me.VstoSmartTags.Add(New CarSmartTag()) 5. Add the custom SmartTag to VstoSmartTags collection

19 demo VSTO Custom SmartTags recognizer

20 DataBinding Vediamo la via più facile

21 demo VSTO Data Binding The easy way

22 DataBinding – The model Data Binding Data Source Host Item Controls Workbook/Document Optional XML Data Island OptionalDataCaching DataAdaptor Typed DataSet BindingSource Defined by CustomerDataSet.xsd

23 VSTO Data Binding Support E necessario che I controlli derivano da BindableComponent DataBindings collection property myNamedRange1.DataBindings.Add()BindingSource DataSource DataSet DataMember DataTable Update DataSet dal Data Bindings Update DataSource tamite DataAdaptor

24 Excel ListObject Complex DataBinding Estende le funzionalità native di Excel Nuovi metodi, proprietà, eventi Deriva da BindableComponent Databind con data source bindabili DataSet, DataTable, DataView Array, IList, IListSource, BindingList<> SQL stored procedure, XML, web services Aggancio a design-time e a run-time

25 Static ListObject

26 Dinamic ListObject

27 demo VSTO Data Binding Working with ListObject

28 Domande? Registratevi su Stay tuned!

29 © 2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. MICROSOFT MAKES NO WARRANTIES, EXPRESS OR IMPLIED, IN THIS SUMMARY.


Download ppt "VSTO Day ActionsPane e la gestione dei dati Gianluca Ciocci"

Similar presentations


Ads by Google