[Request] Change tab name to the name of the collection
dprice opened this issue · 3 comments
dprice commented
I able very pleased with CosmosDbExplorer - well done! So much better than the Azure Portal experience. I opened my instance and started viewing a few collections. I quickly realized that it was difficult to tell which collection I was viewing unless I check the data. It would be nice to give an indicator of which collection belongs to which tab. Maybe change the tab name to the collection name?
Thanks again!
dprice commented
I downloaded the source and found where I could change the tab title and it seemed to work, but this is my first time looking at WPF code, so I'm not sure if it's the best place:
public override async void Load(string contentId, DocumentNodeViewModel node, CosmosConnection connection, CosmosDatabase database, CosmosContainer container)
{
ContentId = contentId;
Node = node;
Connection = connection;
Container = container;
PartitionKey = container.PartitionKeyPath;
//var split = Node.Parent.Container.SelfLink.Split(new char[] { '/' });
ToolTip = $"{Connection.Label}/{database.Id}/{Container.Id}";
// *********************************************** HERE
Header = Container.Id;
// *********************************************** HERE
AccentColor = Connection.AccentColor;
_cosmosDocumentService = ActivatorUtilities.CreateInstance<CosmosDocumentService>(_serviceProvider, connection, database, container);
await LoadDocuments(true, new CancellationToken());
}
sachabruttin commented
dprice commented
Thanks so much!