It looks like when you click to clear the selection, it calls the TextBox.SelectionChanged ( MyTextBox_SelectionChanged ) event handler, and Selection represents an empty selection (i.e. just an insertion point). Your handler sets the SelectedValue combo box using the empty selection font size, which is reasonable even if the selection is empty. (The insertion point still has a font size.)
Changing SelectedValue , of course, causes the ComboBox.Selection ( FontSize_SelectionChanged ) event handler to fire. And since this event handler does not have an easy way to distinguish between an event caused by a user selecting a new value, and an event caused by your code changing the SelectedValue property, it goes ahead and tries to change the font size of the selection, which you probably do not want to do in this particular case.
However, you would think that everything will be fine, because the choice is empty, and you are just trying to set its font size regardless of its font size. But here's the strange thing: when you call ApplyPropertyValue on this empty choice, it seems to set FontSize for the whole document.
So the effect is that when you click to clear the selection, your code sets the entire font size of the document as the font size at the point where you click.
I suspect the error is in ApplyPropertyValue , because this only happens if the initially selected text was selected by dragging from left to right, starting with the very first character. Again, it is not entirely clear what the behavior is if you apply formatting to an empty selection. So, perhaps this is most likely a case of invoking undefined behavior, rather than getting a specific error in WPF.
In any case, a reasonable way to fix this is to change the change handler with a list:
if (FontSize.SelectedItem != null && !MyTextBox.Selection.IsEmpty) { MyTextBox.Selection.ApplyPropertyValue( TextBlock.FontSizeProperty, FontSize.SelectedItem); }
This is just an attempt to resize the selection font if the selection is not empty.