Exemple #1
0
void
TextSelection::ApplyPropertyValue (DependencyProperty *formatting, Value *value)
{
	RichTextBox *rtb = anchor.GetRichTextBox ();
	if (rtb == NULL) {
		g_warning ("this shouldn't happen...");
		return;
	}

	rtb->ApplyFormattingToSelection (this, formatting, value);
}
Exemple #2
0
void
TextSelection::ApplyPropertyValue (DependencyProperty *formatting, Value *value)
{
    DependencyObject *el = anchor.GetParent();
    while (el) {
        if (el->Is (Type::RICHTEXTBOX))
            break;
        el = el->GetParent() ? el->GetParent()->GetParent() : NULL;
        if (!el)
            break;
    }
    if (el == NULL) {
        g_warning ("this shouldn't happen...");
        return;
    }

    RichTextBox *rtb = (RichTextBox*)el;

    rtb->ApplyFormattingToSelection (this, formatting, value);
}