I am using the Cloud File Api to write a custom OneDrive-like sync client. I have a desire to have custom properties that are available in explorer.
When I register my CFAPI SyncRoot during installation, I can define custom properties as follows.
var initialPropDefinitions = syncRootInfo.StorageProviderItemPropertyDefinitions;
var customPropDefinitions = propertyManager.GetCustomPropertyDefinitions();
foreach (var propDef in customPropDefinitions)
{
var osPropDef = new StorageProviderItemPropertyDefinition
{
DisplayNameResource = propDef.DisplayNameResource,
Id = propDef.Id
};
initialPropDefinitions.Add(osPropDef);
}
_storageProvider.RegisterSyncRoot(syncRootInfo);
This works great. The properties I assign are available in windows explorer to add as columns.
My problem comes when I try to set the property values. Below is the code that I use to assign property values.
This works well but, Explorer crashes whenever I use an empty IconResource. I can fix this by creating a blank icon. So I had an example where I have 3 properties, one actually has an icon and the other two are blank. The status column shows all of the icons and you can see that the blank icons are taking up real estate under the status column. Sure, I can arrange my properties so that all of the ones that have real icons are set first. But, I would really like a way to set property values without using an icon. Is there such a way? This seems like a bug that you can't have custom properties WITHOUT an Icon
I am using the Cloud File Api to write a custom OneDrive-like sync client. I have a desire to have custom properties that are available in explorer.
When I register my CFAPI SyncRoot during installation, I can define custom properties as follows.
This works great. The properties I assign are available in windows explorer to add as columns.
My problem comes when I try to set the property values. Below is the code that I use to assign property values.
This works well but, Explorer crashes whenever I use an empty IconResource. I can fix this by creating a blank icon. So I had an example where I have 3 properties, one actually has an icon and the other two are blank. The status column shows all of the icons and you can see that the blank icons are taking up real estate under the status column. Sure, I can arrange my properties so that all of the ones that have real icons are set first. But, I would really like a way to set property values without using an icon. Is there such a way? This seems like a bug that you can't have custom properties WITHOUT an Icon