MousePosition of RadContextMenu

3 posts, 0 answers
  1. Wenhao
    Wenhao avatar
    17 posts
    Member since:
    Jan 2012

    Posted 13 Mar 2012 Link to this post

    Hi,

    Currently we upgraded the Telerik RadControls from 2011Q3(for SL4) to 2012Q1(for SL5), but we noticed that the MousePosition property of RadContextMenu would now return a value relative to the child UIElement. How could we still get the mouse position on visual parent of RadContextMenu when it's opened, just like it was in version 2011 Q3? We just test using the following codes, but the result varies.

    <Grid x:Name="LayoutRoot" Background="White">
            <telerik:RadContextMenu.ContextMenu>
                <telerik:RadContextMenu x:Name="ContextMenu" Height="200" Width="150"
                                        Opened="ContextMenu_Opened">
                </telerik:RadContextMenu>
            </telerik:RadContextMenu.ContextMenu>
            <Grid Width="300" Height="300" Background="Red">
            </Grid>
        </Grid>
  2. Boyan
    Admin
    Boyan avatar
    758 posts

    Posted 19 Mar 2012 Link to this post

    Hello Wenhao,

    We managed to reproduce the change in behavior. We have made some changes to the behavior of the control. You can check the changes here. It seems that one of this changes has caused this different behavior. We will further investigate this and will follow up this thread.

    Regards,
    Boyan
    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
  3. DevCraft banner
  4. Boyan
    Admin
    Boyan avatar
    758 posts

    Posted 21 Mar 2012 Link to this post

    Hi,

    This change is intended, as this is needed in some other scenarios. There is a workaround for your case though. You can use TransformToVisual method. I have attached a simple project how this can be achieved. Hope this works for your.

    Greetings,
    Boyan
    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
Back to Top