Custom user control focus in RadMenuItem

4 posts, 1 answers
  1. Simon
    Simon avatar
    23 posts
    Member since:
    Apr 2012

    Posted 14 May 2012 Link to this post


    I have a user control that contains a text box and a search button. This user control has been added to a RadMenu as follows:

     <telerik:RadMenu HorizontalAlignment="Stretch" DataContext="{Binding SimpleSearchViewModel}">
                        <DockPanel HorizontalAlignment="Stretch" />
                    <telerik:RadMenuItem Header="Menu1" /> 
                    <telerik:RadMenuItem Header="Menu2" />  
                    <telerik:RadMenuItem HorizontalAlignment="Right">
                            <searchctrls:SimpleSearchView />


    This seems to work fine. The problem I am experiencing is that when the user control (SimpleSearchView) is focused, say, with the cursor in the textbox, it takes two (2) clicks to close the application using the "X" at the corner of the window. This behavior does not seem to appear with any other UI item in my application, i.e. I can focus the textbox in the SimpleSearchView control and then click another menu item without a problem.

    Could you help me resolve this issue?

    Let me know if a separate sample project would be helpful.

    Many thanks
  2. Simon
    Simon avatar
    23 posts
    Member since:
    Apr 2012

    Posted 16 May 2012 Link to this post


    This question has been posted for more than than a day now. Is Telerik support reviewing all the questions / posts? Do I need to provide more information or is my question unclear? Am I missing something?

  3. Answer
    Georgi avatar
    364 posts

    Posted 18 May 2012 Link to this post

    Hi Simon,

    We are sorry for the late reply.
    I was able to reproduce the issue. In order to prevent those kind of issues RadMenu is listening for a Click related events. As you can see in the attached project the LeftMouseButtonDown event is not triggered and the RadMenu does not register any Click related event so it just loses focus. What you can do is use RadWindow instead of Window. In the attached project you can see that it works just fine with RadWindow.

    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  4. Simon
    Simon avatar
    23 posts
    Member since:
    Apr 2012

    Posted 18 May 2012 Link to this post

    Thank you for the answer, it is greatly appreciated!
Back to Top