I am allowing the users to be able to make their own font choices for a listview. What would you consider the best approach for this. Should I save it to the registry or to a file in the application folder, and what properties should be saved to make sure that the font is redisplayed properly when the application is restarted?
Thanks for your suggestions.
EDIT:
Thanks for all the answers.In answering one of your questions - The machine will not be used for multiple users.
what should I save inorder to recreate the settings.
if I save it to a delimited string can the font class parse this? "Microsoft Sans Serif, 8.25pt, style=Bold"
Regarding where/how to save application settings see this answer
You can save your font as a string and load it later using following code:
Font font1 = new Font("Arial", 12, FontStyle.Italic);
TypeConverter converter = TypeDescriptor.GetConverter(typeof(Font));
// Saving Font object as a string
string fontString = converter.ConvertToString(font1);
// Load an instance of Font from a string
Font font = (Font)converter.ConvertFromString(fontString);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With