我有一个控件,我想启用属性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>