无法解析指定对象上的TargetProperty IsHitTestVisable

时间:2015-01-04 14:52:32

标签: xaml silverlight

我有一个控件,我想启用属性IsHitTestVisable,因为它在不透明度中消失。代码编译,但只要移动鼠标,我就会收到以下错误:System.InvalidOperationException: Cannot resolve TargetProperty IsHitTestVisable on specified object.

<local:MotionVisibleControl MinWidth="486" x:Name="MotionActivatedControls" MouseEnterAnimation="
    {StaticResource mouseenter}" Opacity="0" IsHitTestVisible="False">

<Storyboard x:Name="mouseenter">
    <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="MotionActivatedControls">
        <SplineDoubleKeyFrame KeyTime="00:00:00.4000000" Value="1" KeySpline="0.495999991893768,0,0.49099999666214,1"/>
    </DoubleAnimationUsingKeyFrames>

    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="MotionActivatedControls" Storyboard.TargetProperty="IsHitTestVisable">
        <DiscreteObjectKeyFrame Value="True" KeyTime="0"/>
    </ObjectAnimationUsingKeyFrames>
</Storyboard>

1 个答案:

答案 0 :(得分:2)

您拼错Visible错误。

请尝试IsHitTestVisible