I have a need to get the current style of a document. The GetCurrentSpanStyle method of RadRichTextBox is protected, so I cannot use this. The only way that I have been able to get the current style is to create a override of RichTextBoxCommandBase for this purpose.
public
class
GetCurrentSpanStyleCommand : RichTextBoxCommandBase
{
public
GetCurrentSpanStyleCommand(RadRichTextBox editor) :
base
(editor)
{
}
protected
override
void
ExecuteOverride(
object
parameter)
{
}
public
Span ExecuteGetCurrentSpanStyle()
{
return
base
.GetCurrentSpanStyle();
}
}
Is there a better way to do this?