Based on some user settings I am creating QueryFeatureLayers from a database. When the QueryDescription is generated, I can see the UniqueQueryLayerName property seems to be a combination of the database role, and the QueryLayerName property.
The QueryDefinition class does not offer a method to set any of its public properties, and I didn't find a CIM class for the QueryDescription.
Unfortunately, when using the SetDefinition method of a FeatureLayer the UniqueQueryLayerName property is used in the TOC of my MapView.
If I am correct then I cannot alter the name shown in the QueryDescription, but have to do this after the FeatureLayer received the definition, leading to an undesired behaviour of showing the UniqueQueryLayerName, just to be updated with the "correct" name, that I know already from the start.
What I am missing is a property in the QueryDescription where I can set the display name of the layer to be, before I am handing the QueryDescription over to the layer.