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的问题,你能帮我吗?谢谢。请随便问一个问题——如果我能帮上忙,我会非常高兴的。