Title Back Colour Keyoti Title Line Title Curve
Blue Box Top

Using WPF as you type with a subclassed RTB - RapidSpell WPF - Forum

Welcome Guest Search | Active Topics | Log In | Register

Options
MCMike
#1 Posted : Wednesday, March 16, 2011 1:13:04 PM
Rank: Member

Groups: Registered

Joined: 3/16/2011
Posts: 2
This is more or less what I am trying to get working. We create the WPF RichtextBox in code, and I'm trying to set up the binding. It compiles, but won't spell check?
What am I doing wrong?

Thx,

Mike


//set RichTextBox events
RichTextBox richTextBox = GetTemplateChildFromDictionary("richTextBox") as RichTextBox;
if (richTextBox != null)
{
richTextBox.PreviewMouseDown += new MouseButtonEventHandler(this.richTextBox_MouseDown);
}

Keyoti.RapidSpell.Wpf.RapidSpellAsYouType rapid = new Keyoti.RapidSpell.Wpf.RapidSpellAsYouType();
Binding b = new Binding();
b.ElementName = "richTextBox";
rapid.SetBinding(Keyoti.RapidSpell.Wpf.RapidSpellAsYouType.TextBoxProperty, b);
Dan
#2 Posted : Wednesday, March 16, 2011 2:41:16 PM
Rank: Advanced Member

Groups: Administrators, Registered

Joined: 10/20/2004
Posts: 456
Mike, unsure why your way isn't working but there's a simpler way

RichTextBox richTextBox = GetTemplateChildFromDictionary("richTextBox") as RichTextBox;
if (richTextBox != null)
{
richTextBox.PreviewMouseDown += new MouseButtonEventHandler(this.richTextBox_MouseDown);
}

Keyoti.RapidSpell.Wpf.RapidSpellAsYouType rapid = new Keyoti.RapidSpell.Wpf.RapidSpellAsYouType();

rapid.TextBox = richTextBox;

Unless you wanted to do it your way?

Dan
Dan Wright
MCMike
#3 Posted : Wednesday, March 16, 2011 3:30:52 PM
Rank: Member

Groups: Registered

Joined: 3/16/2011
Posts: 2
Hi Dan -

Yeah, I originally did it your way, didn't work, changed it to the way I illustrated, didn't work, changed it back to the way you suggested. It's funny, when I start up our application, I get the nag screen because I'm on a trial, and my app displays, including the container for the rich textbox, but the as-you-type spell checker just isn't working?

Good thing I'm testing it with our weird setup here. I'd really like to get this working ASAP, as if I can you guys are my choice.

Mike
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.




About | Contact | Site Map | Privacy Policy

Copyright © 2002- Keyoti Inc.