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

  • 相关阅读:
    文本表征:SoW、BoW、TF-IDF、Hash Trick、doc2vec、DBoW、DM
    词表征 3:GloVe、fastText、评价词向量、重新训练词向量
    词表征 2:word2vec、CBoW、Skip-Gram、Negative Sampling、Hierarchical Softmax
    词表征 1:WordNet、0-1表征、共现矩阵、SVD
    机器学习基石笔记:Homework #4 Regularization&Validation相关习题
    机器学习基石笔记:16 Three Learning Principles
    [JavaEE] 了解Java连接池
    [JavaEE] Maven简介
    [MySQL] 按日期进行统计(前一天、本周、某一天)
    [MySQL] 按年度、季度、月度、周、日统计查询
  • 原文地址:https://www.cnblogs.com/haio/p/1782274.html
Copyright © 2011-2022 走看看