Title Back Colour Keyoti Title Line Title Curve
Blue Box Top

RapidSpell As you Type for a third party control? - RapidSpell WPF - Forum

Welcome Guest Search | Active Topics | Log In | Register

Options
iconabhi113
#1 Posted : Thursday, August 15, 2019 10:19:05 PM
Rank: Newbie

Groups: Registered

Joined: 8/15/2019
Posts: 2
Location: USA
Hi,
I have a third party RichTextBox control called WPFRichText2. How do I set the RapidSpell As You Type to this control?
In the User Guide, it's mentioned to specify this way:

Code:
TextBox="{Binding ElementName=richTextBox1}"


My third party control:

Code:
<rt:RichTextEditor x:Name="EmailBody" Text="{Binding EmailBody, Mode=TwoWay}" IsContextMenuEnabled="False" IsToolBarVisible="False" IsReadOnly="False"  />


When I tried to specify EmailBody as the ElementName, it didn't work.
Jim
#2 Posted : Friday, August 16, 2019 12:32:04 AM
Rank: Advanced Member

Groups: Administrators, Registered

Joined: 8/13/2004
Posts: 2,667
Location: Canada
Hi, the spell checker won't know what to do with a 3rd party control. Is rt:RichTextEditor a UserControl or a Control containing a RichTextBox? Or is it a subclass of RichTextBox? Or something else?

Thanks
Jim
-your feedback is helpful to other users, thank you!


iconabhi113
#3 Posted : Friday, August 16, 2019 2:44:34 PM
Rank: Newbie

Groups: Registered

Joined: 8/15/2019
Posts: 2
Location: USA
Thanks Jim. It's a third party control which kind of extends the RichTextBox control. Here's the project site for the control:
https://github.com/After...Axel/WPF-RichText-Editor
Jim
#4 Posted : Friday, August 16, 2019 6:32:39 PM
Rank: Advanced Member

Groups: Administrators, Registered

Joined: 8/13/2004
Posts: 2,667
Location: Canada
Ok, so it has a wrapped RichTextBox called mainRTB, which means you can access it by adding this property to the RichTextEditor class

Code:

        public RichTextBox MainRTB
        {
            get { return mainRTB; }
        }


and then binding to it like this

Code:

<wpf:RapidSpellAsYouType TextBox="{Binding MainRTB,ElementName=sampleEditor}"></wpf:RapidSpellAsYouType>


where sampleEditor is the RichTextEditor control.

When you do that you will see it underlining as desired, but the contextmenu will be the built in one from RichTextEditor. So you can merge RapidSpell's suggestions with it according to https://keyoti.com/produ...enu%20Customization.htm

Jim

-your feedback is helpful to other users, thank you!


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.