zoukankan      html  css  js  c++  java
  • Silverlight 焦点疑云

    焦点,还是焦点。silverlight 在不同的Style下,竟然失去了焦点,所以,当你的界面,子窗口突然没了焦点,可以去查一查你的Style做了哪些改动。

    在作一个ChildWindow的显示时,以前使用的Style是可以在子窗口内获得键盘输入,但是为了某个效果,复制了一个stlye,去掉了一些动画效果,

    结果回来发现,键盘输入功能失效了,所有的键盘事件都不响应了。

                                    <VisualState x:Name="Open">
                                        <Storyboard>
                                            <DoubleAnimationUsingKeyFrames BeginTime="0" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="Overlay">
                                                <EasingDoubleKeyFrame KeyTime="0" Value="0"/>
                                                <EasingDoubleKeyFrame KeyTime="00:00:00.3" Value="1"/>
                                            </DoubleAnimationUsingKeyFrames>
                                            <DoubleAnimationUsingKeyFrames BeginTime="0" Storyboard.TargetProperty="(RenderTransform).(Children)[0].ScaleX" Storyboard.TargetName="ContentRoot">
                                                <SplineDoubleKeyFrame KeyTime="0" Value="0"/>
                                                <SplineDoubleKeyFrame KeyTime="00:00:00.25" Value="0"/>
                                                <SplineDoubleKeyFrame KeyTime="00:00:00.4" Value="1"/>
                                                <SplineDoubleKeyFrame KeySpline="0,0,0.5,1" KeyTime="00:00:00.45" Value="1.05"/>
                                                <SplineDoubleKeyFrame KeyTime="00:00:00.55" Value="1"/-->
                                            </DoubleAnimationUsingKeyFrames>
                                            <DoubleAnimationUsingKeyFrames BeginTime="0" Storyboard.TargetProperty="(RenderTransform).(Children)[0].ScaleY" Storyboard.TargetName="ContentRoot">
                                                <SplineDoubleKeyFrame KeyTime="0" Value="0"/>
                                                <SplineDoubleKeyFrame KeyTime="00:00:00.25" Value="0"/>
                                                <SplineDoubleKeyFrame KeyTime="00:00:00.4" Value="1"/>
                                                <!--SplineDoubleKeyFrame KeySpline="0,0,0.5,1" KeyTime="00:00:00.45" Value="1.05"/>
                                                <SplineDoubleKeyFrame KeyTime="00:00:00.55" Value="1"/>
                                            </DoubleAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </VisualState>

    当时就想,要是有一个焦点的跟踪列表就好了。但是好像从古至今,没有这个东西啊。

    焦点问题在silverlight中这是一个比较困惑的问题。

    比如,控件的KeyUp,KeyDown事件,应该截获所有的键盘,但是偏偏缺省按钮的事件不能截获。

  • 相关阅读:
    htmilunit-- 针对抓取js生成的数据
    httpClient get方式抓取数据
    post方式的数据抓取
    利用win10自带的系统配置禁止开机启动项和程序
    linq中怎么实现多条件关联的左右连接
    win10提示管理员已阻止你运行此应用,如何强制运行
    远程连接SQL Server 2014遇到的问题和解决
    eclipse中删除多余的tomcat server
    resultMap之collection聚集
    empty()和remove()的区别
  • 原文地址:https://www.cnblogs.com/haio/p/1782274.html
Copyright © 2011-2022 走看看