Select to view content in your preferred language

Change backstage button

225
6
Jump to solution
a month ago
MinhHoangf
Emerging Contributor

Hi all, I'm working with ArcGIS Pro SDK Add-in. I want to change "Project" button caption, that open backstage, to something else in my language. I cannot find anything relate to that button in DAML ID Reference.

I also want to customize application's titlebar. How to do it?

Please help me. Thanks.

0 Kudos
1 Solution

Accepted Solutions
Wolf
by Esri Regular Contributor
Esri Regular Contributor

Hi @MinhHoangf 
Indeed the "Project" button (as @UmaHarano  mentioned) is not a standard Framework Plugin (button) like the other tabs on the ArcGIS Pro ribbon.  But, since ArcGIS Pro is a WPF application, and you can 'spy' on the WPF visual tree (you can use Visual Studio to do so) to find which control implements the "Project" button.   I found that the "Project" control's name is "appButton" and the type of the control is "ActiproSoftware.Windows.Controls.Bars.RibbonApplicationButton".  Once ArcGIS Pro is open you can use the code below to update the "Project" button to "New Caption".  Note: since we can't access any ActiProSoftware resources the code below is using reflection to make the .Content property update:

Screenshot 2025-05-01 113754.png

 

// change the caption of the 'Application' button in the main window: appButton
string newCaption = "New Caption";
var mainWindow = FrameworkApplication.Current.MainWindow;
if (mainWindow != null)
{
  var appButton = mainWindow.FindName("appButton");
  if (appButton != null && appButton is FrameworkElement frameworkElement)
  {
    System.Diagnostics.Trace.WriteLine($@"{appButton.GetType()}");
    PropertyInfo propertyInfo = appButton.GetType().GetProperty("Content");
    propertyInfo.SetValue(appButton, Convert.ChangeType(newCaption, propertyInfo.PropertyType), null);
  }
}

 

In similar fashion you can update the Application's titlebar, but be aware that the titlebar is getting overwritten by project names. 

View solution in original post

6 Replies
David_Lindsey
Frequent Contributor

(Edit: Comment removed. Correct answer provided by Wolf and Uma)

0 Kudos
UmaHarano
Esri Regular Contributor

Hi @Min The "Project" button is a special button and cannot be customized.

To change the application title, please use a "Managed Configuration".  

ProConcepts: Configuration 

Configuration Samples.

Wolf
by Esri Regular Contributor
Esri Regular Contributor

Hi @MinhHoangf 
Indeed the "Project" button (as @UmaHarano  mentioned) is not a standard Framework Plugin (button) like the other tabs on the ArcGIS Pro ribbon.  But, since ArcGIS Pro is a WPF application, and you can 'spy' on the WPF visual tree (you can use Visual Studio to do so) to find which control implements the "Project" button.   I found that the "Project" control's name is "appButton" and the type of the control is "ActiproSoftware.Windows.Controls.Bars.RibbonApplicationButton".  Once ArcGIS Pro is open you can use the code below to update the "Project" button to "New Caption".  Note: since we can't access any ActiProSoftware resources the code below is using reflection to make the .Content property update:

Screenshot 2025-05-01 113754.png

 

// change the caption of the 'Application' button in the main window: appButton
string newCaption = "New Caption";
var mainWindow = FrameworkApplication.Current.MainWindow;
if (mainWindow != null)
{
  var appButton = mainWindow.FindName("appButton");
  if (appButton != null && appButton is FrameworkElement frameworkElement)
  {
    System.Diagnostics.Trace.WriteLine($@"{appButton.GetType()}");
    PropertyInfo propertyInfo = appButton.GetType().GetProperty("Content");
    propertyInfo.SetValue(appButton, Convert.ChangeType(newCaption, propertyInfo.PropertyType), null);
  }
}

 

In similar fashion you can update the Application's titlebar, but be aware that the titlebar is getting overwritten by project names. 

MinhHoangf
Emerging Contributor

@Wolf  @UmaHarano  Thanks for your help. This method is very flexible. 😀

0 Kudos
MinhHoangf
Emerging Contributor

@Wolf @UmaHarano How to change Ribbon/QAT context menu? What DAML ID of this menu?

contextmenu.png

0 Kudos
UmaHarano
Esri Regular Contributor

ArcGIS Pro Configuration extensibility pattern can be used to modify the QAT.  More info here: 
Cofigurations: OnCreateQuickAccessToolbar 

0 Kudos