开发者

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 x:Name="FocusStates">
                                    <VisualState x:Name="Focused">
                                        <Storyboard>
                                 开发者_如何学C           <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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜