Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/macos/8.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 动态更改视觉状态DiscreteObjectKeyFrame值_C#_Silverlight_Windows Phone 7_Windows Phone 8_Windows Phone - Fatal编程技术网

C# 动态更改视觉状态DiscreteObjectKeyFrame值

C# 动态更改视觉状态DiscreteObjectKeyFrame值,c#,silverlight,windows-phone-7,windows-phone-8,windows-phone,C#,Silverlight,Windows Phone 7,Windows Phone 8,Windows Phone,我有列表项边框的视觉状态,如下所示: <VisualStateGroup x:Name="CommonStates"> <VisualState x:Name="Normal"/> <VisualState x:Name="MouseOver"> <Storyboard> <ObjectAnimationUsingKeyFrames

我有列表项边框的视觉状态,如下所示:

<VisualStateGroup x:Name="CommonStates">
    <VisualState x:Name="Normal"/>
        <VisualState x:Name="MouseOver">
            <Storyboard>
                <ObjectAnimationUsingKeyFrames
                    Storyboard.TargetName="ListItemBorder"
                    Storyboard.TargetProperty="Background">

                    // how to pass the value to here. 
                    <DiscreteObjectKeyFrame KeyTime="0" Value="#c9vbf2"/>

                </ObjectAnimationUsingKeyFrames>
            </Storyboard>
        </VisualState>
    <VisualState x:Name="Disabled"/>
</VisualStateGroup>

//如何将值传递到此处。
如何更改值
c9vbf2
。我的
附件资源中有该值


我正在处理WP8,您可以这样参考您的信息来源:

<VisualStateGroup x:Name="CommonStates">
  <VisualState x:Name="Normal"/>
    <VisualState x:Name="MouseOver">
      <Storyboard>
        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ListItemBorder" Storyboard.TargetProperty="Background">
          <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource YourCustomBrush}" />
        </ObjectAnimationUsingKeyFrames>
      </Storyboard>
    </VisualState>
  <VisualState x:Name="Disabled"/>
</VisualStateGroup>


我有一个关于webview的问题,你能帮我吗?谢谢。请随便问一个问题——如果我能帮上忙,我会非常高兴的。