ArcGIS Pro SDK for.net: UI Design and MVVM

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

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

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

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

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

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

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

Advanced Customization. Charles Macleod, Steve Van Esch

Beginning Editing and Editing UI Patterns. Thomas Emge Narelle Chedzey

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

Implementing MVVM in Real World ArcGIS Server Silverlight Applications. Brandon Copeland LJA Engineering, Inc.

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

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

Configurations. Charles Macleod Wolfgang Kaiser

Deploying ios Apps. Al Pascual

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

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

Practical WPF. Learn by Working Professionals

WPF and MVVM Study Guides

Configuring and Customizing the ArcGIS Viewer for Silverlight. Katy Dalton

Navigator for ArcGIS an Introduction

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

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

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

Architecting ArcGIS Server Solutions for Linux and Solaris

Transitioning to the ArcGIS Runtime SDK for.net. Antti Kajanus & Mike Branscomb

ArcGIS Runtime SDK for.net Building Apps. Rex Hansen

Customizing the Operations Dashboard for ArcGIS

ArcGIS Viewer for Silverlight Advanced Topics

Best Development Practices and Patterns Using ArcGIS Runtime SDK for Android. Xueming Wu Puneet Prakash

ArcGIS Runtime SDK for.net Getting Started. Jo Fraley

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

New ArcGIS Server Application Developers? Experience in Programming with Java? Knowledge of Web Technologies? Experience with the Java WebADF?

ArcGIS for Mobile Devices: An Overview. Jeff Shaner Bonnie Stayer

Note: This demo app created for this lab uses the Visual Studio 2015 RTM and Windows Tools SDK ver

CPSC Tutorial 6

ArcGIS Pro Tasks: Tips and Tricks. Jason Camerano

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

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

Getting Started with ArcGIS Runtime. Jeff Shaner David Cardella

Getting Started with ArcGIS Runtime SDK for Java SE

Workspace Desktop Edition Developer's Guide. Customize Views and Regions

Introduction to Your First ArcGIS Enterprise Deployment. Thomas Edghill & Jonathan Quinn

Developers Road Map to ArcGIS Desktop and ArcGIS Engine

Windows Presentation Foundation (WPF)

Understanding and using Metadata across the ArcGIS Platform. Aleta Vienneau Marten Hogeweg

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

ExecuTrain Course Outline MOC 6460A: Visual Studio 2008: Windows Presentation Foundation

Building Maps for the Public. Allen Carroll, David Asbury, and Jim Herries

03 Model-View-ViewModel. Ben Riga

Advanced Development with the ArcGIS API for JavaScript. Jeremy Bartley, Kelly Hutchins, Derek Swingley

RadGanttView For Silverlight and WPF

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

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

Geo-enable your.net apps with ArcGIS Online and Runtime. Antti Kajanus Thad Tilton

Introduction to ArcGIS API for Flex. Bjorn Svensson Lloyd Heberlie

ArcGIS API for JavaScript

Building Your own Widget with ArcGIS API for JavaScript

Introductions Who are we? ArcGIS Engine Java Dev team members. Who are you? ArcGIS Desktop developers? MapObjects Java developers? Current ArcGIS Engi

Windows Presentation Foundation. Jim Fawcett CSE687 Object Oriented Design Spring 2018

Esri Production Mapping: Configuring the Solution for Civilian Topographic Agencies. Sean Granata

Prism Composite Application Guidance

ArcMap Editing Tips and Tricks. Sean Jones

ArcGIS Runtime: Building Cross-Platform Apps. Rex Hansen Mark Baird Michael Tims Morten Nielsen

Creating Web Mapping Applications. Nikki Golding

Index. Application programming interface (API), 38. Binary Application Markup Language (BAML), 4

ICAP - Intelligence Configuration for ArcGIS Pro. Natalie Feuerstein Dan Barnes Joe Bayles

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

Hit the Ground Running. ArcGIS Runtime SDK for Android

Introduction to Microsoft Word 2010

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

Understanding and Using Geometry, Projections, and Spatial Reference Systems in ArcGIS Annette Locke, Rob Juergens

Developing Mobile Apps with the ArcGIS Runtime SDK for.net

Chapter 5. Presenting Data

Advanced JavaScript. Gary Sheppard & James Tedrick

Introduction to JavaScript. Evan Caldwell & James Tedrick

The Road to Runtime. Mark Cederholm UniSource Energy Services Flagstaff, Arizona

Getting Started with the Smartphone and Tablet ArcGIS Runtime SDKs. David Martinez, Kris Bezdecny, Andy Gup, David Cardella

Migrating your WPF Apps to the New ArcGIS Runtime SDK for.net. Mike Branscomb Antti Kajanus

Introduction to Microsoft Word 2010

ArcGIS Online A Security, Privacy, and Compliance Overview. Andrea Rosso Michael Young

Enabling High-Quality Printing in Web Applications

ArcGIS GeoEvent Server: Making 3D Scenes Come Alive with Real-Time Data

ArcGIS Viewer for Microsoft Silverlight An Introduction

Enabling High-Quality Printing in Web Applications. Tanu Hoque & Jeff Moulds

Workspace Desktop Edition Developer's Guide. Best Practices for Views

Getting Started with ArcGIS for Server. Charmel Menzel and Ken Gorton

ArcGIS Pro Editing. Jennifer Cadkin & Phil Sanchez

Better UI Makes ugui Better!

ArcGIS Runtime SDK for Android An Introduction. Xueming

Migrating from ArcMap to ArcGIS Pro. David Watkins Scott Noulis

TRAINING GUIDE. ArcGIS Online and Lucity

Developing Qt Apps with the Runtime SDK

Customization of ArcGIS Pro: WSDOT s GIS Workbench Data Access Add-In

Reference Services Division Presents. Microsoft Word 2

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

Collector for ArcGIS: What s New. Chris LeSueur & James Tedrick

Foxit Reader Quick Guide

@jbarry

ArcGIS Runtime SDKs Building Offline Apps. Nick Furness

Transcription:

Esri Developer Summit March 8 11, 2016 Palm Springs, CA ArcGIS Pro SDK for.net: UI Design and MVVM Charlie Macleod, Wolf Kaiser

Important Customization Patterns for the Pro SDK MVVM Hooking Pro Commands MVVM Lists & Collections MVVM Embedded Control

MVVM Pattern in Addins MVVM and variants are defacto pattern for WPF UI implementations Many Frameworks available Home grown or hand rolled Commercial (free, purchased) Pro MVVM is built on top of ActiPro (http://www.actiprosoftware.com/products/controls/wpf ) The Basic Pattern is: ViewModel declared in DAML and implemented in code View referenced in DAML and implemented as WPF UserControl Model is optional Note: To customize the Pro UI, you must use its MVVM Framework. Substitutes are not allowed.

MVVM Pattern in Addins ModelViewViewModel (MVVM) Pattern used for many of the Framework elements Dockpane Pane Custom Control Embeddable Control Property Page

Demo: MVVM Dockpane Template

Hooking Commands Get any Pro control s ICommand and use it in your addin using Framework s GetPlugInWrapper method. Following example shows how a Pro control s command can be added to your addin button click method. (or anywhere else in your addin). // ArcGIS Pro's Create button control DAML ID. var commandid = DAML.Button.esri_mapping_createBookmark; // get the ICommand interface from the ArcGIS Pro Button // using command's plugin wrapper // (note ArcGIS.Desktop.Core.ProApp can also be used) var icommand = FrameworkApplication.GetPlugInWrapper(commandId) as ICommand; if (icommand!= null) { // Let ArcGIS Pro do the work for us if (icommand.canexecute(null)) icommand.execute(null); }

Hooking Commands Adding a button to the Dockpane to run the Close ArcGIS Pro Command Adding a button to the Dockpane with our custom Zoom in behavior RelayCommand is an implementation of ICommand which lets you specify your own implementation of Execute and CanExecute

Demo: Hooking Pro Commands

MVVM Dockpane Singleton Has no context association with the ribbon and no active tool Once created only hidden, never destroyed View Model derives from the DockPane Contract View is Custom User Control associated with DockPane declaratively (Use of Model is optional and completely up to developer) <dockpanes> <dockpane id="custom_tocdockpane" caption="my Contents""className="DockPaneViewModel" dock="group condition="esri_core_mappane"" dockwith="esri_core_projectdockpane"> <content classname="dockpaneview""/> </dockpane> </dockpanes>

Multithreading considerations ArcGIS Pro Framework s managed threading model: Updating UI collections from a worker thread Framework provides QueuedTask to guarantee that UI actions happen in a sensible order without corruption Locking is required when sharing objects across threads Recommended pattern for updating collections from a worker thread Found in.net BindingOperations helper class: BindingOperations.EnableCollectionSynchronization

Demo Custom Identify Window

Matching ArcGIS Pro Look & Feel Check ProGuide ArcGIS Pro Styles for available styles, fonts, etc. Example buttons:

Embeddable Control Adds a Custom UI Component for use with MapTools Uses MVVM Linked with a MapTool When the Tool is activated the Control becomes visible over the Active MapView When the Tool is deactivated the Control is hidden Think popup

Embeddable Control New for 1.2 Add to the Config.daml via the ArcGIS Pro SDK template

Embeddable Control Template updates the esri_embeddablecontrols category in Config.daml DAML follows same Pro MVVM pattern <categories> <updatecategory refid="esri_embeddablecontrols"> <insertcomponent id= MapToolDemo_EmbeddableControl" classname= EmbeddableControl1ViewModel"> <content classname= EmbeddableControl1View" /> </insertcomponent> </updatecategory> </categories>

Embeddable Control Associate a Tool with the Control via the Tool s OverlayControlID Access the View Model via this.overlayembeddablecontrol internal class MySelectionTool : MapTool { private EmbeddableControl1ViewModel _vm = null; public MySelectionTool() { this.overlaycontrolid = "MapToolDemo_EmbeddableControl1"; } protected override Task OnToolActivateAsync(bool active) { if (_vm == null) { _vm = this.overlayembeddablecontrol as EmbeddableControl1ViewModel; } return base.ontoolactivateasync(active); } internal class EmbeddableControl1ViewModel : EmbeddableControl { public OverlayControlViewModel(XElement options) : base(options) } {

Embeddable Control By default, position is at Upper Left of MapView To enable moving disable hit testing on a portion of your UserControl In other words, simply let the parent handle the MouseMove <UserControl x:class=."> <Grid> <Border Background="{DynamicResource Esri_Gray100}" BorderBrush="{DynamicResource Esri_Gray125}" BorderThickness="1" IsHitTestVisible="False"> <TextBlock Text="{Binding ClickText}" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="4"/> </Border> </Grid> </UserControl>

ArcGIS Pro SDK for.net Sessions Tue March 8: 4:00 PM 5:00 PM Primrose A (Palm Springs Convention Center) ArcGIS Pro SDK for.net: Programming Patterns Tue March 8: 5:30 PM 6:30 PM Primrose A (Palm Springs Convention Center) ArcGIS Pro SDK for.net: Editing and Geodatabase Integration Wed March 9: 10:30 AM 11:30 AM Catalina/Madera (Renaissance Hotel) ArcGIS Pro SDK for.net: Integration with ArcGIS Online Wed March 9: 10:30 AM 11:30 AM Mesquite C (Palm Springs Convention Center) ArcGIS Pro SDK for.net: Solution Based Configuration of ArcGIS (at 1.3) Wed March 9: 4:00 PM 5:00 PM Primrose B (Palm Springs Convention Center) ArcGIS Pro SDK for.net: UI Design and MVVM Thu March 10: 9:00 AM 10:00 AM Primrose C/D (Palm Springs Convention Center) ArcGIS Pro SDK for.net: Animation and Map Exploration