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

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

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

ArcGIS Pro SDK for.net: UI Design and MVVM

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

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

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: Asynchronous Programming and MVVM Patterns in Pro. Wolfgang Kaiser

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

Configurations. Charles Macleod Wolfgang Kaiser

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

Advanced Customization. Charles Macleod, Steve Van Esch

Beginning Editing and Editing UI Patterns. Thomas Emge Narelle Chedzey

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

Windows Presentation Foundation for.net Developers

Windows Presentation Foundation (WPF)

SPARK. User Manual Ver ITLAQ Technologies

ArcGIS Viewer for Silverlight Advanced Topics

Wpf Button Click Event Firing Multiple Times

Configuring and Customizing the ArcGIS Viewer for Silverlight. Katy Dalton

WPF and MVVM Study Guides

NetAdvantage for WPF 13.1 Service Release Notes August 2013

Getting Started with Access

What s New Essential Studio User Interface Edition

DOT NET SYLLABUS FOR 6 MONTHS

INFRAGISTICS Silverlight 15.1 Volume Release Notes 2015

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

CPSC 481 Tutorial 10 Expression Blend. Brennan Jones (based on tutorials by Bon Adriel Aseniero and David Ledo)

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

Desktop Studio: Charts. Version: 7.3

PowerPoint 2016 Building a Presentation

Introduction. Part I: Silverlight Fundamentals for ASP.NET Developers 1

Beginning Silverlight 5 in C #

BCIS 4650 Visual Programming for Business Applications

Desktop Studio: Charts

Week 8: Data Binding Exercise (Bookstore)

CPSC Tutorial 9 Blend & Animations

Exam Name: MOS: Microsoft Office Word 2010 Expert

Theme System. Wisej Themes 1 OVERVIEW

03 Model-View-ViewModel. Ben Riga

Microsoft CSharp

Microsoft Windows Apps Dev w/microsoft.net Framework 4. Download Full Version :

Accurate study guides, High passing rate! IT TEST BOOK QUESTION & ANSWER. Ittestbook provides update free of charge in one year!

Introduction to Data Templates and Value Converters in Silverlight

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

Customizing the Operations Dashboard for ArcGIS

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

Index. Windows 10 running, 199 suspended state, 199 terminate apps,

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

SPARK. User Manual Ver ITLAQ Technologies

Word Tips & Tricks. Status Bar. Add item to Status Bar To add an itme to the status bar, click on the item and a checkmark will display.

This document contains a general description of the MVVMStarter project, and specific guidelines for how to add a new domain class to the project.

NetAdvantage for WPF 12.2 Service Release Notes January 2013

Reviewing Hidden Content during Native Review

C# Programming: From Problem Analysis to Program Design. Fourth Edition

Microsoft Office Illustrated Introductory, Finishing a Presentation

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

Developing Native Windows Phone 7 Applications for SharePoint

Trident Trust PowerPoint User Guide

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

Exam sell. Higher Quality Better Service! Certified IT practice exam authority.

NetAdvantage for Silverlight Line of Business 11.2 Service Release Notes - August 2012

Exercises Lecture 3 Layouts and widgets

INFRAGISTICS WPF 15.2 Service Release Notes September 2016

MATRIX Release Notes 6.1

OX Documents Release v Feature Overview

Double-click on the PowerPoint icon on the desktop. Another way to access the program is to click on the Start button>programs>powerpoint.

Kendo UI. Builder by Progress : What's New

Hands-On Lab. Taskbar -.NET (WPF) Lab version: 1.0.0

Nintex Forms 2010 Help

To complete this database, you will need the following file:

User Guide. Product Design. Version 2.2.2

Client Configuration Cookbook

CS-Studio Display Builder

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

Client Configuration Cookbook

INFRAGISTICS Silverlight 15.2 Volume Release Notes 2015

User Guide Product Design Version 1.7

Excel Main Screen. Fundamental Concepts. General Keyboard Shortcuts Open a workbook Create New Save Preview and Print Close a Workbook

Microsoft Office PowerPoint 2016: Part 1. Course Overview

Hands-On Lab. Building Applications in Silverlight 4 Module 6: Printing the Schedule. Printing the Schedule

ArcGIS Runtime SDK for.net Getting Started. Jo Fraley

INFRAGISTICS WINDOWS FORMS 17.2 Volume Release Notes 2017

Microsoft Word Chapter 1. Creating, Formatting, and Editing a Word Document with Pictures

ArcGIS Pro Editing. Jennifer Cadkin & Phil Sanchez

PowerPoint Introduction. Video: Slide Basics. Understanding slides and slide layouts. Slide Basics

Exam Name: TS: Microsoft.NET Framework 3.5, Windows Presentation Foundation Application

Overview. What are layouts Creating and using layouts Common layouts and examples Layout parameters Types of views Event listeners

HCA Tech Note 120. Configuring the Control UI Home Page. Option 1: HCA constructs the home page

Pro Business Applications with Silverlight 4

Microsoft PowerPoint 2013 Beginning

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

Extending ArcGIS Pro with.net and Python: Interactive Analytics. Carlos A. Osorio-Murillo Mark Janikas

AURUM Metro Navigation

Windows Presentation Foundation Programming Using C#

What s New in Access 2007

Yes, this is still a listbox!

Building Your own Widget with ArcGIS API for JavaScript

Microsoft Office Excel 2007: Basic. Course Overview. Course Length: 1 Day. Course Overview

Computer Applications Final Exam Study Guide

Transcription:

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

Framework Elements - Recap Any Framework Element 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 All Elements have a definition within DAML

Framework Elements - Recap Majority of Framework Elements are represented by Visual Studio Item templates - Automates generation of DAML - Add relevant code-behind files to the project Some Framework Elements need a much higher degree of customization (than a template can provide) - Custom Control - Gallery - Dynamic Context Menus Note: Complete element reference is here: https://github.com/esri/arcgis-pro-sdk/wiki/proconcepts-framework

Demo Pro SDK Project and Item Templates

CustomControl Hosted on the Ribbon. - You require a more sophisticated control beyond a single button, split button, or individual control - Examples: CustomAnimation sample TimeNavigation sample

CustomControl Run CustomControl item template - Will create DAML entry and a UserControl and ViewModel for CustomControl implementation UI goes in the CustomControl1.xaml Code behind in the CustomControl1ViewModel.cs - Becomes similar to Dockpane, Property Sheet, Embeddable Control

CustomControl UI Content can be any mix of WPF controls - You are responsible for all Binding - Provide the appropriate properties in your ViewModel - Keep sizing appropriate for hosting on the ribbon. - Small group = 22 pixels height - Large group = 68 pixels height - There is no OnClick (eg, as with a button). - Events will be generated directly from your WPF controls

Demo Custom Control Time Navigation

Gallery Container control, displays a collection of related items in rows and columns If too many items are in the gallery an expand arrow is provided Contents are populated at run time Individual gallery items are modelled using GalleryItem class Style with a GalleryTemplate.xaml

Gallery Shown as a split-button with a dropdown that exposes gallery Do any content initialization in the Gallery code-behind OnDropDownOpened - GalleryItems are created at runtime class Gallery1 : Gallery { protected override void OnDropDownOpened() { //Handle populating gallery content Initialize(); } private void Initialize() { //TODO: Init content Whenever a gallery item is clicked, the Gallery OnClick is called with the clicked GalleryItem as a parameter

Gallery DAML gallery definition: <!-- Config.daml <galleries> <gallery id="timenavigation_bkmgallery"... rows="4" itemsinrow="4" # of rows and columns datatemplatefile=...timebkmgallerytemplate.xaml" Data template templateid="timebkmitemtemplate"> Resource key <button refid="esri_mapping_createbookmark" /> Child button </gallery> <! TimeBkmGalleryTemplate.xaml <DataTemplate x:key="timebkmitemtemplate"> <StackPanel Orientation="Vertical... <Image Source="{Binding Icon}... <TextBlock Text="{Binding Text}...

Gallery Galleries can also be defined as inline Inline shows gallery items directly in the ribbon (not in a dropdown) Set the inline attribute on the gallery reference to true (Done automatically for you via the inline gallery template) <groups> <group id= Time_Group" caption="map Time"> <gallery refid="time_inlinegallery1" inline="true" size="large"/> </group>

Dynamic Menus Use when a dynamically populated menu is required - i.e. Content is not known until the menu is shown 1. Can be used as a dynamic context menu - e.g. in conjunction with MapTool to create a custom context menu with MapView 2. Can be used as dynamic content for another (parent) menu No Helper SDK Item templates

Dynamic Menus - Procedure 1. As a Context Menu 1. Declare a DynamicMenu element in DAML 2. Implement DynamicMenu derived class in code-behind - Populate menu content in the DynamicMenu.Popup callback 3. Create the menu using FrameworkApplication.CreateContextMenu - Second parameter is the name of a property that provides a System.Windows.Point for the menu location 4. Show the menu by setting isopen = true on your context menu - contextmenu.isopen = true triggers OnPopup() callback - Complete code next slide

Dynamic Menus Implement derived class Step 1 DAML <dynamicmenu id="dynamicmenu1" classname=..." caption=..." /> Step 2 Implement derived class internal class DynamicFeatureSelectionMenu : DynamicMenu { //Define delegate to be called when your menu items are clicked public delegate void FeatureSelectedDelegate(BasicFeatureLayer layer, long oid); private readonly FeatureSelectedDelegate _delegate = null; _delegate = OnFeatureSelected; //assignment is elsewhere e.g. constructor... //Populate your menu items use DynamicMenu.Add overloads" protected override void OnPopup() { foreach (var selitem in Module1.CurrentFeatureSelection) { this.add($"{selitem.layer.name}: {selitem.oid}", null, false, true, false, _delegate, selitem.layer, selitem.oid); //Your delegate void OnFeatureSelected(BasicFeatureLayer layer, long oid) { var mapview = MapView.Active; mapview?.flashfeature(layer, oid); //etc,etc

Dynamic Menus Invoke As a Context Menu - Show the menu using FrameworkApplication.CreateContextMenu - Setting isopen=true triggers Popup callback //e.g. in your maptool internal class FeatureSelectionDynamic : MapTool { protected override Task<bool> OnSketchCompleteAsync(Geometry geometry) { //TODO your logic, workflow, etc. //Step 3: Create the dynamic menu var contextmenu = FrameworkApplication.CreateContextMenu("DynamicMenu1"); contextmenu.datacontext = this; //optional set data context if needed contextmenu.closed += (o, e) => { //TODO any clean up you need on menu close }; //Step 4 set menu visible, trigger OnPopup() callback contextmenu.isopen = true;

Dynamic Menus - Procedure 2. As Content ~within~ another menu 1. Add a dynamicmenu refid as a child in the parent menu - By default, dynamic content is shown as a side-pull from the parent menu - Set inline=true to add your content directly (i.e. no side-pull) <dynamicmenu id="dynamicmenu1" classname= MyDynamicMenu" caption=..." />... <menu id="mainmenu" caption="mainmenu"> <button refid="somemenubutton"/> <dynamicmenu refid= DynamicMenu1" inline="true"/><! inline, not side-pull <button refid="othermenubutton" separator="true"/> </menu> 2. Implement DynamicMenu derived class in code-behind as before 3. Popup callback will be called whenever the parent menu is shown - NO need to manually call FrameworkApplication.CreateContextMenu

Demo Dynamic Menu

Add-in Styling New at 1.4 is Dark Theme. In order for your Add-ins to blend when theme is toggled they must be styled correctly - Will also support High Contrast mode for accessibility - Note: It is not required that your Add-ins blend though is desirable in most cases

General Rules Use ESRI Styles (and Colors) to the greatest extent possible for: - Text (most important) - Buttons (most important) - Other controls: TextBox, Listbox, Combobox, Datagrid, TreeView, Border, etc. <TextBlock Text="{Binding Name}" Style="{DynamicResource RegularText}" /> <Button x:name= MyButton" Style="{DynamicResource Esri_SimpleBorderlessButton}" <Image Source="{Binding Thumbnail}"> <Image.Effect> <DropShadowEffect Color="{DynamicResource Esri_Color_Gray145}" BlurRadius="14" ShadowDepth="4.5 /> </Image.Effect> </Image>

General Rules Prefer use of DynamicResources (avoids compilation issues with StaticResources) All controls will inherit a basic default style from the Pro Framework if one is not. assigned - Default style will correctly style all elements in Default, Dark, or High Contrast modes - Avoid using System colors in XAML. - They will not flip to dark alternatives when the theme changes - Esri styles and colors flip automatically for you. Avoid setting background colors on User Controls. - Setting background color to transparent can solve most issues allowing background color of host pane to show through

Examples Panes already come with the correct background color

Examples Dialogs at 1.4 inherit from ArcGIS.Desktop.Framework.Controls.ProWindow - Has correct background - Correct title bar styling - Avoid directly inheriting from System.Windows.Window

Examples Galleries will inherit the correct style from the base Actipro control - BUT you are responsible for correctly styling gallery items - Use ESRI_Styles!

Examples Text styles using Esri styles ensures that the color is always correct in Default or Dark themes

Examples Incorrect text styling. Note how the incorrect text color stayed black in Dark theme.

Styling Demo

Styling Resources At 1.4: All Pro samples have been styled correctly for Default, Dark theme, High Contrast - Examine how they are styled - https://github.com/esri/arcgis-pro-sdk-community-samples Concept documentation on Github will be enhanced with styling reference - HowTo guidelines - List of text styles - List of control styles - List of colors ProGuides on Github - Styling walkthroughs

Thank You to Our Sponsors