private void LoadLayerChildren(Layer layer, TreeNode node)
        {
            LayerUI layerUI = layer.GetPrimaryUI();
            layerUI.SetUICallbacks(this);

            if (layerUI == null || !layerUI.HasTreeViewNodes)
            {
                return;
            }
            List<LayerUITreeNode> nodes = layerUI.GetTreeNodes();
            foreach (LayerUITreeNode layerNode in nodes)
            {
                LoadLayerChild(layerNode, node);
            }
            node.Expand();
        }
 void ConnectLayerUi(Layer layer)
 {
     LayerUI layerUI = layer.GetPrimaryUI();
     layerUI.SetUICallbacks(this);
 }