This is a migrated thread and some comments may be shown as answers.

Overlaying over Silverlight

3 Answers 28 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Meerkat
Top achievements
Rank 1
Meerkat asked on 17 Sep 2008, 04:38 PM
Hello,
Sadly you do not appear to have yet ported your excellent RadEditor to Silverlight. No problem, I thought, I will just overlay the Ajax version over the top of the latest version of Silverlight, using a div with display:none and display:block. All works fine except that after I hide the Editor (display:none), none of the direction keys, or back button work in the Silverlight text boxes. Also the cursor from the RadEditor remains on the Silverlight page. Although this is irritating, I can live with it. Does anyone have any idea what can be done about the arrow keys ? Please do not hesitate to ask if I have have not made the
problem clear.

Many thanks,

Pete.

3 Answers, 1 is accepted

Sort by
0
Meerkat
Top achievements
Rank 1
answered on 17 Sep 2008, 06:13 PM
Hello, I wanted to add something to my previous post but a message warned me that if I added anything, then my message would not be anwered ???? Doesn't make sense - very confusing !!!!

Anyway, I just wanted to say that I have a working example that demonstrates my problem, which I am more than happy to send if you tell me how.

Thanking you in anticiption,

Pete.
0
Accepted
Valeri Hristov
Telerik team
answered on 18 Sep 2008, 11:16 AM
Hi Pete,

You can open a new support ticket and attach the example there. We will check it and suggest how to proceed further.

Best wishes,
Valeri Hristov
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Meerkat
Top achievements
Rank 1
answered on 19 Sep 2008, 08:41 AM
Hello Valerie,
Your fix worked perfectly.
I append your reply in case it is of any use to others.
Very many thanks,
Pete.


Hello Pete,

I managed to fix the problem by adding the highlighted code in your Silverlight application:

private void onHideEditor(object sender, RoutedEventArgs e)
{
    HtmlDocument doc = HtmlPage.Document;
    HtmlElement element = doc.GetElementById("divEditor");

    element.Focus();
    element.SetStyleAttribute("display", "none");
}

It seems that the Silverlight application does not properly get the focus from RadEditor when you hide it, and the it still processes some of the key down events, even if it does not have the focus. So, I just focused RadEditor container element before hiding the editor and everything seems to work fine now. I am sure that focusing almost any other element will have the same effect.

Let us know if you have additional problems.

All the best,

Valeri Hristov
the Telerik team
Tags
Editor
Asked by
Meerkat
Top achievements
Rank 1
Answers by
Meerkat
Top achievements
Rank 1
Valeri Hristov
Telerik team
Share this question
or