Bug: Context menu position is wrong when using browser zoom

2 posts, 0 answers
  1. hwsoderlund
    hwsoderlund avatar
    419 posts
    Member since:
    Aug 2006

    Posted 02 Feb 2011 Link to this post

    I have tested this in FireFox 3.6 and IE 8 on Windows 7. When I zoom with the browser to something other than 100%, the positioning of context menus with a Placement property other than Absolute is wrong. The following XAML should reproduce it. Just use the browser zoom and click the HyperlinkButtons.

    <UserControl x:Class="MvvmLightScheduler01.Test01"
                 xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                 xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
                 xmlns:teleriknav="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Navigation"
                 mc:Ignorable="d">
        <Grid>
     
            <StackPanel HorizontalAlignment="Center"
                        VerticalAlignment="Center">
     
                <HyperlinkButton Content="Button 1 - Bottom"
                                 Margin="5">
                    <teleriknav:RadContextMenu.ContextMenu>
                        <teleriknav:RadContextMenu EventName="Click"
                                                   Placement="Bottom">
                            <teleriknav:RadContextMenu.Items>
                                <teleriknav:RadMenuItem Header="Option One"></teleriknav:RadMenuItem>
                                <teleriknav:RadMenuItem Header="Option Two"></teleriknav:RadMenuItem>
                                <teleriknav:RadMenuItem Header="Option Three"></teleriknav:RadMenuItem>
                            </teleriknav:RadContextMenu.Items>
                        </teleriknav:RadContextMenu>
                    </teleriknav:RadContextMenu.ContextMenu>
                </HyperlinkButton>
     
                <HyperlinkButton Content="Button 2 - Top"
                                 Margin="5">
                    <teleriknav:RadContextMenu.ContextMenu>
                        <teleriknav:RadContextMenu EventName="Click"
                                                   Placement="Top">
                            <teleriknav:RadContextMenu.Items>
                                <teleriknav:RadMenuItem Header="Option One"></teleriknav:RadMenuItem>
                                <teleriknav:RadMenuItem Header="Option Two"></teleriknav:RadMenuItem>
                                <teleriknav:RadMenuItem Header="Option Three"></teleriknav:RadMenuItem>
                            </teleriknav:RadContextMenu.Items>
                        </teleriknav:RadContextMenu>
                    </teleriknav:RadContextMenu.ContextMenu>
                </HyperlinkButton>
     
                <HyperlinkButton Content="Button 3 - Right"
                                 Margin="5">
                    <teleriknav:RadContextMenu.ContextMenu>
                        <teleriknav:RadContextMenu EventName="Click"
                                                   Placement="Right">
                            <teleriknav:RadContextMenu.Items>
                                <teleriknav:RadMenuItem Header="Option One"></teleriknav:RadMenuItem>
                                <teleriknav:RadMenuItem Header="Option Two"></teleriknav:RadMenuItem>
                                <teleriknav:RadMenuItem Header="Option Three"></teleriknav:RadMenuItem>
                            </teleriknav:RadContextMenu.Items>
                        </teleriknav:RadContextMenu>
                    </teleriknav:RadContextMenu.ContextMenu>
                </HyperlinkButton>
     
                <HyperlinkButton Content="Button 4 - Absolute (CORRECT POSITIONING)"
                                 Margin="5">
                    <teleriknav:RadContextMenu.ContextMenu>
                        <teleriknav:RadContextMenu EventName="Click"
                                                   Placement="Absolute">
                            <teleriknav:RadContextMenu.Items>
                                <teleriknav:RadMenuItem Header="Option One"></teleriknav:RadMenuItem>
                                <teleriknav:RadMenuItem Header="Option Two"></teleriknav:RadMenuItem>
                                <teleriknav:RadMenuItem Header="Option Three"></teleriknav:RadMenuItem>
                            </teleriknav:RadContextMenu.Items>
                        </teleriknav:RadContextMenu>
                    </teleriknav:RadContextMenu.ContextMenu>
                </HyperlinkButton>
     
     
            </StackPanel>
        </Grid>
    </UserControl>
  2. Hristo
    Admin
    Hristo avatar
    832 posts

    Posted 04 Feb 2011 Link to this post

    Hi Henrik,

    Thank you for reporting this. It is fixed and will be included with the next Latest Internal Build.
    I have updated your telerik point.

    All the best,
    Hristo
    the Telerik team
    Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>
  3. DevCraft banner
Back to Top