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

Cannot resolve TargetProperty IsHitTestVisable on specified object

我有一个控件,我想在它的不透明度逐渐消失时启用属性 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>

您拼写 Visible 错误。

试试 IsHitTestVisible