none
当AllowsTransparency="True"的情况下菜单被挡住 RRS feed

  • 问题

  • 系统环境:Windows XP

    问题描述:下拉菜单被挡住(如图http://www.vippiano.com/4.png)

    出现原因:不详,初步判断是因为对右键弹出效果做了动画处理

    <EventTrigger RoutedEvent="ContextMenu.Opened">
                                                    <BeginStoryboard>
                                                        <Storyboard>
                                                            <DoubleAnimationUsingKeyFrames Duration="0:0:0.3" Storyboard.TargetProperty="Width">
                                                                <LinearDoubleKeyFrame KeyTime="0:0:0.1" Value="200"/>
                                                                <LinearDoubleKeyFrame KeyTime="0:0:0.2" Value="150"/>
                                                            </DoubleAnimationUsingKeyFrames>
                                                            <DoubleAnimationUsingKeyFrames Duration="0:0:0.3" Storyboard.TargetProperty="Height">
                                                                <LinearDoubleKeyFrame KeyTime="0:0:0.1" Value="130"/>
                                                                <LinearDoubleKeyFrame KeyTime="0:0:0.2" Value="120"/>
                                                            </DoubleAnimationUsingKeyFrames>
                                                        </Storyboard>
                                                    </BeginStoryboard>
                                                </EventTrigger>

    导致问题的出现,但是并不是经常出现被挡住的情况。

    已经在2台电脑上出现过这个问题了,不是100%可以重现的,大概测试一周才会出现一次,出现以后必须重启系统才能正常,否则启动任何其它WPF程序在AllowsTransparency="True"的情况下无论是右键菜单还是ComboBox都会被主界面挡住。

    2011年3月31日 7:57

答案

  • 你好 yooho,

    首先,我没遇到过这种问题,根据你的描述,我也很难得出原因和解决方案,这边也很难测试一你的问题,我建议你提交Feedback,可能这是解决你问题的最好方案。这论坛里面我想解决起来还是相当有难度的。

    提交反馈的链接是:

    https://connect.microsoft.com/wpf

     

    Best regards,


    Sheldon _Xiao[MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    • 已标记为答案 yooho 2011年4月1日 6:56
    2011年4月1日 3:37
    版主

全部回复