ArcGIS Pro tab control

654
10
11-03-2017 10:53 AM
Highlighted
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)
Reply
0 Kudos
10 Replies
Highlighted
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.

Reply
0 Kudos
Highlighted
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

Reply
0 Kudos
Highlighted
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

Highlighted
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.

Reply
0 Kudos
Highlighted
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...

Highlighted
Occasional Contributor II

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

Highlighted
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.

Highlighted
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?

Reply
0 Kudos
Highlighted
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?