Hello,
The CustomColorsConfigLocationNeeded event fires on dialog close but does not seem to fire on dialog open or load. So I can save a custom location for the custom colors when the dialog is closed but can't reference that location when the dialog is subsequently opened again. What am I missing?
Best regards,
Robert
I have logged it in our feedback portal by making this thread public. You can track its progress, subscribe for status changes and add your comments on the following link - feedback item.
I have also updated your Telerik points.
Currently, the possible solution that I can suggest is to copy/paste th file from your custom location to C:\Users\'User Name'\AppData\Local.
Steps to reproduce:
1. Run the attached sample project and click the button.
2. Add several custom colors and click OK.
3. Click the button again to open the color dialog. You will notice that th custom colors are there.
4. Restart the application and open the color dialog. You will notice that stored custom colors in the local folder are not loaded.
Hi Dess,
Yes, the custom_colors.cfg file works well at the default location. But we want it stored in the same folder as all our other application settings files. The default location is as you pointed out in the AppData/Local folder. But that doesn't always work for users on a locked down network. We need it in the AppData/Roaming folder in our application folder.
Using the CustomColorsConfigLocationNeeded event we can easily change that location when the ColorDialog closes because the event actually fires at that time. So the custom_colors.cfg is saved to our desired folder. So far so good.
Private Sub _myColorSelector_CustomColorsConfigLocationNeeded(sender As Object, args As CustomColorsEventArgs) Handles _myColorSelector.CustomColorsConfigLocationNeeded
args.ConfigLocation = FileUtilities.AcquireApplicationDataFolder(False)
End Sub
However, that event does not fire when the ColorDialog is opened again. So the dialog does not know that there is a new location for the custom_colors.cfg file and continues to look in the default location.
So how do we get the ColorDialog to recognize and use the new location?