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: BoucherS **

As a workaround, you could use the following (for the FontSize) :
In the "RichTextBoxFormatBar.cs" file :

1) in the "FontSize_SelectionChanged" method :
replace
ApplyPropertyValueToSelectedText( TextElement.FontSizeProperty, e.AddedItems[ 0 ] );
with
if( _cmbFontSizes.IsDropDownOpen )
ApplyPropertyValueToSelectedText( TextElement.FontSizeProperty, e.AddedItems[ 0 ] );

2) in the "OnApplyTemplate" method :
Add
_cmbFontSizes.KeyUp += new System.Windows.Input.KeyEventHandler( FontSize_KeyUp );
(don't forget to unregister)

3) the "fontSize_KeyUp" method would be :
private void FontSize_KeyUp( object sender, System.Windows.Input.KeyEventArgs e )
{
if( e.Key == System.Windows.Input.Key.Enter )
{
ApplyPropertyValueToSelectedText( TextElement.FontSizeProperty, _cmbFontSizes.SelectedValue );
}
}


Viewing all articles
Browse latest Browse all 4964

Trending Articles



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