Select to view content in your preferred language

Show layer custom properties in Esri Layer dialog

03-13-2023 02:07 PM
New Contributor

I created a Plugin Datasource layer that uses a proprietary file as a datasource. CustomProperties are added to this layer upon creation. Is there a way to show these values in the standard Esri layer property dialog where the custom properties are listed on the left along with General, Metadata, Source, etc?

0 Kudos
1 Reply
Esri Regular Contributor

here's an example of a custom page for feature layers: - assuming u have added a property sheet/page to your addin (eg using the item template). The key is updating the desired property sheet collection. In this case, I am updating "esri_mapping_featureLayerPropertySheet" which is the collection for feature layers.





Config.daml (note: by default the template uses "<page..." - note that for "<udpdateSheet" u need to use "<insertPage ..."

    <updateSheet refID="esri_mapping_featureLayerPropertySheet">
      <insertPage id="LayerPropertyPageExample_Pages_FeatureLayerCustomPage" 
						caption="Custom Page" className="LayerPropertyPageExample.Pages.FeatureLayerCustomPageViewModel" 
						group="Custom Group">
        <content className="LayerPropertyPageExample.Pages.FeatureLayerCustomPageView" />



internal class Module1 : Module {
 protected override bool Initialize() {
   if (MapView.Active != null) {
     var layers = MapView.Active?.GetSelectedLayers().OfType<FeatureLayer>();
     if (layers?.Count() > 0) {
     var json_settings = new JsonSerializationSettings() {
        PrettyPrint = true
      QueuedTask.Run(() => LayerJSON = layers.First()
      .Subscribe(async (args) => {
   var layers = args.MapView?.GetSelectedLayers().OfType<FeatureLayer>();
   if (layers?.Count() > 0) {
     var json_settings = new JsonSerializationSettings() {
       PrettyPrint = true
     LayerJSON = await QueuedTask.Run(() => 
   return true;

 private string _layerJSON = "";
 public string LayerJSON {
   get {
      return _layerJSON;
   set {
      _layerJSON = value;


Property page View Model and View:

internal class FeatureLayerCustomPageViewModel : Page {
 public string LayerJSON => Module1.Current.LayerJSON;


<UserControl x:Class="LayerPropertyPageExample.Pages.FeatureLayerCustomPageView">
  <Border BorderThickness="1" Padding="1">
      <SolidColorBrush Color="{DynamicResource Esri_Color_Blue}"></SolidColorBrush>
    <ScrollViewer HorizontalScrollBarVisibility="Auto"
     <TextBlock Text="{Binding LayerJSON}"