[英]Can someone show me how to style a radiobutton in Silverlight XAML to outline it (or change it's color) when it get's focus?
I have a radiobutton VisualStateGroup for Focuses, but I don't know how to change the storyboard to highlight the radiobutton on focus. 我有一个用于焦点的单选按钮VisualStateGroup,但是我不知道如何更改情节提要以突出显示焦点上的单选按钮。
<VisualStateGroup x:Name="FocusStates">
<VisualState x:Name="Focused">
<Storyboard>
<DoubleAnimationUsingKeyFrames Storyboard.TargetName="ContentFocusVisualElement" Storyboard.TargetProperty="Opacity">
<SplineDoubleKeyFrame KeyTime="0" Value="1"/>
</DoubleAnimationUsingKeyFrames>
</Storyboard>
</VisualState>
<VisualState x:Name="Unfocused"/>
</VisualStateGroup>
I worked it out. 我解决了。 It turns out the the target element needed to be layered on top of the other elements.
事实证明,目标元素需要在其他元素之上分层。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.