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事件,应该截获所有的键盘,但是偏偏缺省按钮的事件不能截获。

  • 相关阅读:
    IBatisNet之获取和操作SQL语句
    IIS7站点/虚拟目录中访问共享文件夹(转)
    asp.net 4.0 IIS7.0/7.5环境提供了自动预热功能(程序池自动重启)
    仅此一文让你明白ASP.NET MVC原理
    博客、论坛集
    软件开发工具
    delete表1条件是另一个表中的数据,多表连接删除(转)
    Quartz.Net架构入门—开源的作业调度框架
    C# URL 中文编码与解码
    HDU4619--Warm up 2
  • 原文地址:https://www.cnblogs.com/haio/p/1782274.html
Copyright © 2011-2022 走看看