You need to set the SelectedItem property of the ComboBox to an actual FontFamily object. If you lost the serialisation/deserialization stuff then that could be the default they get each time they start using your editor thing. Then that'll be what the user gets until they pick a different one. Propert圜hanged(this, new Propert圜hangedEventArgs(propertyName)) Public void RaisePropert圜hanged( String propertyName = '') Public event Propert圜hangedEventHandler Propert圜hanged Public class FontDetails : INotifyPropert圜hanged If you change FontDetails to give a default font: namespace wpf_FontSize Or you could adapt it and the combo out of MainWindow. You could use that approach so the user picks the font family they prefer and they get that as default when they start again.
The chosen setting is serialised to disk and deserialised on start up again. It's used on a window but you could of course use it at any level in your document instead. That has a class FontDetails which is used to drive font settings. Thanks to the RichTextBox control, this FlowDocument is completely editable!īut if you have a further question on this please start a new thread and provide sufficient code or information to reproduce your issue.
If I throw a richtextbox into my sample then it picks up the default font. What's a richtextbox got to do with selecting the default entry in a combobox?