Quantcast
Channel: Extended WPF Toolkit™ Community Edition
Viewing all articles
Browse latest Browse all 4964

Commented Unassigned: RichTextBoxFormatBar bug!?!? during keyboard input! [19809]

$
0
0
trying to type the size of the font in the dialog.
But if i am typing more than 1 letter or number in the Font Familiy Box or Size Box , the dialog remains open and overwrites the selected text which i'm trying to change the font properties of.
Are there any properties to avoid this ?! or is this a real bug??
Comments: ** Comment from web user: fecub **

So i have now added the if (IsDropDownOpen) clause to the selectionchanged event of both comboboxes (FontFamily and FontSize) and added a KeyUp event to both Comboboxes which look like this:

```
private void FontFamily_KeyUp(object sender, System.Windows.Input.KeyEventArgs e)
{
if (e.Key == System.Windows.Input.Key.Enter && _cmbFontFamilies.SelectedValue != null)
{
ApplyPropertyValueToSelectedText(TextElement.FontFamilyProperty, _cmbFontFamilies.SelectedValue);
}
}

private void FontSize_KeyUp(object sender, System.Windows.Input.KeyEventArgs e)
{
if ((e.Key == System.Windows.Input.Key.Enter) && (!string.IsNullOrEmpty(_cmbFontSizes.Text)) )
{
ApplyPropertyValueToSelectedText(TextElement.FontSizeProperty, _cmbFontSizes.Text);
}
}
```
I did not need to register a new keyup event in the OnApplyTemplate Method,
both comboboxes work fine now, thank you for your help.


Viewing all articles
Browse latest Browse all 4964

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>