ArcGIS Pro Extensibility - Building and Deploying Addins with the new DotNet SDK

Similar documents
ArcGIS Pro SDK for.net Beginning Pro Customization. Charles Macleod

ArcGIS Pro SDK for.net Intro and Pro Add-in Programming Patterns. Wolfgang Kaiser

ArcGIS Pro SDK for.net: Add-in Fundamentals and Development Patterns. Wolf Kaiser, Uma Harano

ArcGIS Pro SDK for.net Advanced User Interfaces in Add-ins. Wolfgang Kaiser

ArcGIS Pro SDK for.net: Advanced User Interfaces in Add-ins. Wolfgang Kaiser

ArcGIS Pro SDK for.net: Asynchronous Programming and MVVM Patterns in Pro. Wolfgang Kaiser

ArcGIS Pro SDK for.net: UI Design and MVVM

Developing Add-Ins for ArcGIS Pro (.NET) Toronto Esri Canada UC Presented by: Gandhar Wazalwar & Kern Ranjitsingh October 11, 2018

Advanced Customization. Charles Macleod, Steve Van Esch

ArcGIS Viewer for Silverlight Advanced Topics

Creating.NET Add-ins for ArcGIS for Desktop

Configuring and Customizing the ArcGIS Viewer for Silverlight. Katy Dalton

Customizing the Operations Dashboard for ArcGIS

Building Java Apps with ArcGIS Runtime SDK

Building WPF Apps with the new ArcGIS Runtime SDK for.net. Antti Kajanus Mike Branscomb

ArcGIS Viewer for Microsoft Silverlight An Introduction

Getting Started with ArcGIS Runtime. Jeff Shaner David Cardella

Agenda. Configuration. Customization. Customization without programming. Creating Add-ins

Customizing MapInfo Pro Using the.net API

.NET Add-ins for ArcGIS for Desktop. John Hauck, Chris Fox

Developing Mobile Apps with the ArcGIS Runtime SDK for.net

AutoCAD 2009 User InterfaceChapter1:

Vizit Essential for SharePoint 2013 Version 6.x User Manual

Integrate GIS Functionality into Windows Apps with ArcGIS Runtime SDK for.net

What s New Essential Studio User Interface Edition

Microsoft Visual C# Step by Step. John Sharp

ArcMap Editing Tips and Tricks. Sean Jones

Developing Qt Apps with the Runtime SDK

ArcGIS Pro SDK for.net Advanced Pro Customization. Charles Macleod

A Guide to Quark Author Web Edition October 2017 Update

What s New for Developers in ArcGIS Maura Daffern October 16

ArcGIS Runtime SDK for WPF

ArcGIS Pro: What s New in Editing and Data Management

Visual Studio 2015: Windows Presentation Foundation (using VB.NET Language) Training Course Outline

Building Applications with the ArcGIS Runtime SDK for WPF

Getting Started with ArcGIS Runtime SDK for the Microsoft.NET Framework. Morten Nielsen Mike Branscomb Antti Kajanus Rex Hansen

Schedule. 75 minute session. Cell phones and pagers. Please complete the session survey we take your feedback very seriously!

Beginning Editing and Editing UI Patterns. Thomas Emge Narelle Chedzey

Configurations. Charles Macleod Wolfgang Kaiser

ArcGIS Viewer for Flex Advanced Topics

Telerik Corp. Test Studio Standalone & Visual Studio Plug-In Quick-Start Guide

Windows Presentation Foundation (WPF)

ArcGIS Pro SDK for.net: An Overview of the Geodatabase API. Colin Zwicker Ling Zhang Nghiep Quang

ArcGIS for Developers: An Introduction. Moey Min Ken

ArcGIS Pro Tasks: Tips and Tricks. Jason Camerano

SYNCFUSION ESSENTIAL STUDIO ENTERPRISE EDITION

ArcGIS Pro SDK for.net UI Design for Accessibility. Charles Macleod

ArcGIS Runtime SDK for.net: Building Xamarin Apps. Rich Zwaap Thad Tilton

ArcGIS Runtime SDK for Java: A Beginner s Guide. Mark Baird JC Malott

03 Model-View-ViewModel. Ben Riga

ArcGIS Runtime SDK for ios and macos: Building Apps. Suganya Baskaran, Gagandeep Singh

ArcGIS Runtime SDK for.net Getting Started. Jo Fraley

Microsoft Access 2013

Microsoft Access 2013

Microsoft. Microsoft Visual C# Step by Step. John Sharp

Programming in C# for Experienced Programmers

Getting Started with ArcGIS Runtime SDK for Java SE

Advanced WCF 4.0 .NET. Web Services. Contents for.net Professionals. Learn new and stay updated. Design Patterns, OOPS Principles, WCF, WPF, MVC &LINQ

Web AppBuilder Presented by

Spatial Data Standards for Facilities, Infrastructure, and Environment (SDSFIE)

ArcGIS Viewer for Flex An Introduction

TRAINING GUIDE. GIS Setup and Config for Lucity Webmap

Developing Cross-Platform Native Apps with AppStudio for ArcGIS. Jo Fraley Erwin Soekianto

Tasks. actions and generate results. Encapsulate a workflow. UI for gathering input. Generate results

WPF and MVVM Study Guides

The C# Programming Language. Overview

Index A, B. Cascading Style Sheets (CSS), 45 Columns, 325 calculations, 330 choice type, 328

PART I: INTRODUCTION TO WINDOWS 8 APPLICATION DEVELOPMENT CHAPTER 1: A BRIEF HISTORY OF WINDOWS APPLICATION DEVELOPMENT 3

Deploying ios Apps. Al Pascual

Independence Community College Independence, Kansas

MCSA Universal Windows Platform. A Success Guide to Prepare- Programming in C# edusum.com

ArcGIS Pro SDK for.net Customize Pro to Streamline Workflows. Wolfgang Kaiser

DOT NET SYLLABUS FOR 6 MONTHS

1. AUTO CORRECT. To auto correct a text in MS Word the text manipulation includes following step.

2310C VB - Developing Web Applications Using Microsoft Visual Studio 2008 Course Number: 2310C Course Length: 5 Days

Prism Composite Application Guidance

What s New in Access 2007

Working with Feature Layers. Russell Brennan Gary MacDougall

Getting Started with the ArcGIS Runtime SDKs. Dave, Will, Euan

Apex TG India Pvt. Ltd.

Android Essentials with Java

Microsoft Visual Studio 2010

for ArcSketch Version 1.1 ArcSketch is a sample extension to ArcGIS. It works with ArcGIS 9.1

Ocean Wizards and Developers Tools in Visual Studio

ArcGIS Pro Editing. Jennifer Cadkin & Phil Sanchez

No Programming Required Create web apps rapidly with Web AppBuilder for ArcGIS

SYNCFUSION ESSENTIAL STUDIO ENTERPRISE EDITION

Building Mashups Using the ArcGIS APIs for FLEX and JavaScript. Shannon Brown Lee Bock

ArcGIS Runtime: Working with Maps Online and Offline. Will Crick Justin Colville [Euan Cameron]

ArcGIS Runtime SDK for.net Building Apps. Antti Kajanus David Cardella

Road Map for Essential Studio 2011 Volume 4

ArcGIS Pro Tasks: An Introduction. Jason Camerano Amir Bar-Maor

Microsoft Access 2010

Sharing Web Layers and Services in the ArcGIS Platform. Melanie Summers and Ty Fitzpatrick

Prism Composite Application Guidance

Mastering VB.NET using Visual Studio 2010 Course Length: 5 days Price: $2,500

ArcGIS Extension User's Guide

ArcGIS Pro Editing: An Introduction. Jennifer Cadkin & Phil Sanchez

ArcGIS Runtime SDK for Qt: Building Apps. Koushik Hajra and Lucas Danzinger

CS342: Software Design. November 21, 2017

Transcription:

ArcGIS Pro Extensibility - Building and Deploying Addins with the new DotNet SDK Charlie Macleod - Esri Esri UC 2014 Demo Theater

New at 10.3 is the ArcGIS Pro Application - Extensibility is provided by the ArcGIS Pro Framework - ArcGIS.Desktop.Framework.dll - Plug in to Framework Extensibility via Addins in the SDK - Visual Studio IDE for many different Framework elements - Currently CSharp - VBNet to follow - ArcGIS Pro Functionality provided via its API. No separate PIAs

Any UI component in the Framework is an extensibility point - Controls (Button, Tool, and variants) - Hosted on Ribbons, Menus, Galleries - Checkbox, Combobox, Label Control, Custom Controls - Tabs, Tab Groups - Toolbars - Menus, Context Menus - Panes - Dockpanes - Galleries - Property Sheets

Addins defined: Declarative definition (in daml declarative xml config file), Metadata.Net Assembly containing the implementation - Can contain 1 or more framework UI extensions - Implement Framework Plugin Contract Resources, images, strings, data References to ArcGIS Pro Assemblies ( the API) Registry free Addins deployed to a well-known folder under <user>\mydocuments

Demo (controls) Zoom Custom Checkbox Context Menu for Layer

Addins consist of a Module and 0 (zero) or more DAML Elements Module: similar to the Extension object used in the 10.x framework. Singletons instantiated automatically by the Framework - Either explicitly (because executing code requested it) - Implicitly because of a context shift (Tab, menu, button was activated) - Program elements within Module are explicitly declared: - Buttons, Tools, Galleries, Combo Boxes, Edit Boxes, Palettes, etc. - Relationship between a Module and its associated components lets the Framework initialize, un-initialize, and remove entire Addins as a whole.

ArcGIS Pro API Modules act as the hub and central access point for API subsystem; For access to functionality within a subsystem, start with its Module. - By convention, all public properties on Modules should be static; - Typically, simply reference the associated assembly and directly use the Module class - If you need access to a Module instance (for non-static methods). Either look for a Current static property or use this pattern: - ExampleModule _thismodule = FrameworkApplication.FindModule("ExampleModule") as ExampleModule;

Within the Module: DAML Elements ( Plug Ins ) All Framework Elements which have an active component inherit from the common base class Plugin public class Plugin { } public sealed override void Dispose() public bool IsDisposed { get; } public String ID { get; } Majority of the methods/properties do not need to be overridden or implemented. Most of the implementation is provided by the DAML declaration

Create an Addin Module: - Add Framework elements to the Module

DAML Declarative definition of the Module and Elements, also Metadata

Model View ViewModel MVVM Pattern for many Framework elements Model - Models objects manage your data, cached state, methods etc. to manipulate the model, persist, etc. - Focus unit tests on Models View Presents the model on the screen. Defined in terms of UI elements View Model Intermediary between model and view. - Wraps the model and exposes properties - Can create convenience properties, coerce property values - Implements change notification for data binding

Model View ViewModel - Dockpane Dockpane - Model your implementation. You provide custom or use ArcGIS Pro model (Map, Bookmark, Layer, ) - ViewModel Implements the Framework Contract. SDK Provides template

Model View ViewModel - Dockpane View visual aspect. Implement as a UserControl - Framework hosts your UserControl on a Dockpane panel. - SDK provides a View template for the Dockpane UserControl

Model View ViewModel - Dockpane In Classic WPF, view and viewmodel are linked via the View datacontext

Model View ViewModel - Dockpane For MVVM Addins - View-View Model relationship is declared in the DAML - Access View Model via Framework (not via View DataContext) - DockpaneViewModel1 dvm = FrameworkApplication.FindDockPane(damlID) as DockpaneViewModel1;

Demo (Dockpane)

Asynchronous Programming MANAGED THREADING FRAMEWORK OVERVIEW - Framework s managed threading model is built on top of Microsoft s TPL and TAP. Framework provides capabilities to include: - Extended Progress Dialog / Cancellation mechanism. - Synchronizing application wide enabled state with task execution. - Synchronizing the current Task s progress and cancellation state with the underlying native C++ code. - Ensures execution order is predictable and sequential for GUI initiated requests (queuing control via QueuingTaskFactory).

Asynchronous Programming MANAGED THREADING FRAMEWORK OVERVIEW QueuingTaskFactory guarantees that UI actions happen in a sensible order without corruption - E.g. Change layer query definition immediately followed by a field calculation The goal of asynchrony in the application API is maintaining GUI responsiveness (not divide and conquer). Internally graphics engine and other aspects do do work in parallel but not through the public API. Fine grained APIs for Geometry and Geodatabase require use of a STA. This is guaranteed through the QueuingTaskFactory

Asynchronous Programming Use QueuingTaskFactory in your static Module methods to allow UI to remain responsive

Demo (Geocode)

Asynchronous Programming Use QueuingTaskFactory for fine grained APIs that require STA - Core.Data and Core.Geometry

Managed Events Framework uses an event mechanism called EventAggregator EventAggregator allows publishers and subscribers to communicate through events without having a direct reference to each other. EventAggregator maintains a weak delegate reference to the subscriber s handler on subscription. - Weak reference will not prevent garbage collection of the subscriber. - Subscribers do not need to unsubscribe but should unsubscribe as best practice.

Managed Events Subscribe ad Unsubscribe Subscribe FrameworkApplication.EventAggregator.GetEvent<ViewerExtentChanged>(). Subscribe(CameraChanged); - ViewerExtentChanged: This is the event we are subscribing to - CameraChanged: This is the callback (or delegate). Can be a lambda - FrameworkApplication.EventAggregator.GetEvent<ViewerExtentChanged>().Subscribe((e)=> { }); Unsubscribe: - FrameworkApplication.EventAggregator.GetEvent<ViewerExtentChanged>().Unubscribe(CameraChanged);

Managed Events - Publish Define the underlying event for the callback public class CustomEventArgs : EventArgs { public string Tag { get; set; } } Define the Managed Event that Consumers will subscribe to. public class CustomEventChanged : CompositePresentationEvent<CustomEventArgs> {} Publish the event as appropriate FrameworkApplication.EventAggregator.GetEvent<CustomEventChanged>().Publish( new CustomEventArgs {Tag = Datetime.Now.ToString() }); For more information consult: http://msdn.microsoft.com/en-us/library/ff921122(v=pandp.20).aspx

Demo (Events)

ArcGIS.Desktop.Internal.XXXXX namespaces Reserved for Esri Internal use only Publicly scoped code (required for Esri modules to share code) - Shared-Internal code is NOT intended for the API - Not supported - API code is developed within Internal namespaces also UC samples are using the internal namespaces - Conscious decision to take advantage of functionality not yet released to the public namespaces - Samples delivered with Final will NOT be using Internal namespaces

Samples available att http://github.com/... These slides available at: For more information please come to the Desktop Development area, Developer Showcase Road Ahead Session ArcGIS Pro.NET SDK: The Road Ahead, Thursday 11am, Exhibit Hall A, Demo Theatre 3 Esri UC 2014 Demo Theater ArcGIS Pro.NET SDK: The Road Ahead

Thank you ArcGIS Pro Extensibility - Building and Deploying Addins with the new DotNet SDK Please fill out the session survey: Online www.esri.com/ucsessionsurveys Paper pick up and put in drop box For more information please come to the Desktop Development area, Developer Showcase Road Ahead Session ArcGIS Pro.NET SDK: The Road Ahead, Thursday 11am, Exhibit Hall A, Demo Theatre 3

ArcGIS Pro UI Elements - Button Buttons are the least complex of all controls, and are declared in DAML using the insertbutton element within the controls container element. The XAML declaration above for the Locate button in ArcGIS Pro includes a few of the most common attributes associated with buttons. Esri UC 2014 Demo Theater ArcGIS Pro.NET SDK: The Road Ahead

ArcGIS Pro UI Elements Button Palette Button palettes are designed specifically for grouping a set of related buttons together. When a button is selected from the palette of buttons, it becomes the active button and is displayed on the collapsed palette.

ArcGIS Pro UI Elements Construction Tool Construction tools are defined in DAML using the tool element. In addition you also need to specify which feature type the construction tool will create. This is achieved by inserting a reference to your construction tool into the categories element updating one of the predefined editing EditTools categories. The example below creates and registers a point construction tool.

ArcGIS Pro UI Elements - Dockpane Dock panes are modeless dialogs which can be docked at the top, right, left, or bottom of the view area within the application. Dock panes can also be grouped with other dock panes and docked relative to each other (i.e. below, above, etc), and can also be un-docked and floated. Finally, dock panes can also be pinned/un-pinned so that they slide back into the frame to save space. For each dock pane each a logical singleton the framework persists and preserves docking state so that when shown in subsequent sessions, dock panes appear in the same positions and in the same state.

ArcGIS Pro UI Elements Dockpane (continued) The example below shows the declaration of a dock pane. This dock pane also specifies a content element which only has a classname attribute. When the framework creates the dock pane, it will also create its content class and it will set the content s data context to the dock pane. This automatic binding allows you to use the MVVM pattern when developing panes and dock panes. For example, a well-designed dock pane will have as little logic as possible in its XAML code behind; instead, all of the controls in the XAML should be bound to properties in the dock pane base class. The dock pane and pane bases classes should be regarded as view-models.

ArcGIS Pro UI Elements Dockpane (continued) Dock panes can be declared such that they are positioned relative to other dock panes using the dockwith attribute. Dock panes can also be established with a condition so that they only appear when the condition is satisfied.

ArcGIS Pro UI Elements - Gallery The Gallery is a new type of control available for the ribbon that behaves similarly to menus. Galleries typically provide a richer representation of the choices offered, each often representing a preview of the result if chosen. Galleries can be organized to show multiple rows and columns simultaneously and are excellent choices when you don t want to be constrained by the smaller one dimensional area offered by a menu. Galleries can present a condensed grid within the ribbon itself using the in-line gallery representation. The items presented in this way are often either the most common or most recently used items depending on the implementation. The actual contents of a gallery are normally populated at runtime. The Gallery declaration below is populated entirely at runtime. Relatively static aspects such as the caption, the dropdown image, item size constraint, tooltip, etc. are specified declaratively. The itemsizestring is used to specify the maximum width of items displayed in the gallery.

ArcGIS Pro UI Elements Gallery (Continued)

ArcGIS Pro UI Elements Inline-Gallery Inline galleries are very similar to the standard gallery in that they provide a set of choices to the user, however rather than using a drop-down representation the choices are presented in a horizontal condensed grid within the ribbon itself.

ArcGIS UI Elements - Menu When initially defined, all menu items are simply listed within the menu element in the order they should appear. Legal elements within a menu include buttons (simple menu items), other menus (pull rights), dynamic menus, galleries, and split buttons.

ArcGIS Pro UI Elements - Pane The framework supports multiple panes, letting users display and interact with multiple subjects. Only one pane can be active at a time. The active pane establishes what is available on the ribbon; switching between different panes may result in changes to what tabs and controls are available. You can open many pane at the same time and these can be grouped, tiled (horizontally or vertically).

ArcGIS Pro UI Elements Split Buttonn Split buttons group related buttons together. The associated group is displayed when the arrow portion of the split button is clicked. Once a control is selected from the drop-down list, it becomes the active control in the split button. Split Buttons can contain either simple button controls, or galleries

ArcGIS Pro UI Elements - Tool Tools in ArcGIS Pro primarily just put the viewer into a particular mode and are therefore very similar to buttons except they automatically stay checked after being selected and they are closely coupled with panes.