ArcGIS Pro tab control

3283
11
11-03-2017 10:53 AM
MaxMax2
Occasional Contributor II

I need to place tab control that should look like standard one:

Is there a style to apply to TabControl to make it look like ArcGIS Pro one?

Tags (2)
0 Kudos
11 Replies
GKmieliauskas
Esri Regular Contributor

Hi Max,

I had the same task few months ago. As I know there is no style exposed to public, but you can make it by yourself. This is a listbox with separators and horizontal items placement. You can find some solutions on the internet. After you can tune your solution using WPF inspector or Snoop which lets you to look inside wpf based application UI. You can find font information, triggers and other useful information. 

It would be nice to have exposed to public that listbox style for future compatibility.

0 Kudos
MaxMax2
Occasional Contributor II

Hi Gintautas,

Yes, I've inspected standard controls to see what styles ESRI use, but I hoped they expose this stuff for developers. Also I believe that should be TabControl with custom style instead of just ListBox with buttons with changing of main area on their clicks.

Anyway thank you!

Max

0 Kudos
GKmieliauskas
Esri Regular Contributor

Hi Max,

I thought about TabControl too, but WPF inspector shows different:

I send you view of my work results with ListBox:

Stackoverflow.com rules ☺

Best regards,

Gintautas

MaxMax2
Occasional Contributor II

Yes, I've implemented tab switchers as ListBox with custom items to mimic native ArcGIS Pro control. I hope Pro team will add this and other their controls to API.

0 Kudos
DanielRouleau
New Contributor III

As I recall there was an old sample on github that had a pane with the listbox panel selector code in it. Here is a link to the old file that had that code, you could try checking out that old branch and seeing it for yourself. I adapted that sample with some changes for my own controls and it did the trick.

https://github.com/Esri/arcgis-pro-sdk-community-samples/blob/1.4.1.7198/Framework/FontStyles/Dockpa...

MaxMax2
Occasional Contributor II

Thanks. I've implemented tab switchers as ListBox with custom items using WPF Snoop to inspect ESRI styling.

UmaHarano
Esri Regular Contributor

With the ArcGIS Pro 2.2 release (to be released soon), a new ListBox style will be available that can be used to create the text items with the separators in between.  You will be able to use this to get the same UI design as the Catalog pane in Pro.

GKmieliauskas
Esri Regular Contributor

Hi Uma,

I am testing ArcGIS Pro 2.3 Beta and new style does not work on it. It worked fine In previous version (2.2) Are changes in using new Esri_ListBoxPanelIndicator style?

0 Kudos
UmaHarano
Esri Regular Contributor

Hi,

The appearance for the tab control and the indicator has changed. When you run the Custom Catalog sample with 2.3, it looks like this (below) - which is different from 2.2.  I made no code changes to the 2.2 sample, just ran it in 2.3 to see this. What do you see? Any errors?