Select to view content in your preferred language

Getting a control to stick at the bottom of a dockpane when using Tabs

556
4
Jump to solution
10-23-2024 09:40 AM
Vidar
by
Frequent Contributor

Hi.

I have followed some ESRI sample code for putting tabs on a dockpane.

See this: https://github.com/Esri/arcgis-pro-sdk/wiki/ProConcepts-Framework#tabindicator

It works well - however if I want to make a button stick to the bottom (with a margin round it) and kind of have it separate itself away from all other controls on the dockpane - I find it almost impossible to figure out because you have to use a ContentPresenter - a kind of template dockpane and I think all the height sizing parameters go haywire!

Whats doubly annoying is that at design time - it looks fine but when you look at the actual control at run time it does not behave - can anyone suggest the correct XAML as I have lost hours on this and I can't waste anymore development time on this - see the screen shots:

Design Time:

design time.png

Runtime:

runtime.png

0 Kudos
1 Solution

Accepted Solutions
GKmieliauskas
Esri Regular Contributor

Hi,

Change Stackpanel to Grid:

        <Grid Grid.Row="1">
            <ContentPresenter  Content="{Binding CurrentPage}"></ContentPresenter>
        </Grid>

Stackpanel has some limitations

View solution in original post

0 Kudos
4 Replies
GKmieliauskas
Esri Regular Contributor

Hi,

I have tested your piece of code in ArcGIS Pro 3.2 and it works in Dockpane and in PropertyPage. Could you share minimum code project to test? I think issue is in parent part of your xaml sample.

GKmieliauskas_0-1729709536067.png

GKmieliauskas_1-1729709568544.png

 

 

0 Kudos
Vidar
by
Frequent Contributor

Hi,

Sorry for the delay - I was just finishing off some work and I have created a visual studio project with an add-in only showing 2 tabcontrols on a dockpane which shows the issue I originally raised. This should help you troubleshoot much more easily the problem I was having.

I look forward to hearing your findings.

 

0 Kudos
GKmieliauskas
Esri Regular Contributor

Hi,

Change Stackpanel to Grid:

        <Grid Grid.Row="1">
            <ContentPresenter  Content="{Binding CurrentPage}"></ContentPresenter>
        </Grid>

Stackpanel has some limitations

0 Kudos
Vidar
by
Frequent Contributor

Wow - just as simple as that! Good to know about the stackpanel limitations though. 
Thanks for helping!

0 Kudos