Doing:
var uri = new Uri(layerUrl);
var layerParams = new FeatureLayerCreationParams(uri);
var featureLayer = LayerFactory.Instance.CreateLayer<FeatureLayer>(layerParams, container);
Where "container" is an existing groupLayer, and which already contains existing featurelayers. And the grouplayer shows as belonging to a branch version in the content pane under the list by data source option.
But when new layer is created, even when passing in the container, it gets created as belonging to SDE.Default, not the existing branch version, and in the content pane it ends up showing 2 group layers with the same name. One is the existing branch version with the existing feature layers, and another is the default version with the newly created feature layers. Both are listed under the list by data source option in the content pane.
Would like to create the new featurelayer under the existing branch, not sde.default.