<Button VerticalAlignment="Top" HorizontalAlignment="Left" BorderBrush="Transparent" Click="FirstCubeSELEcted" x:Name="cube1Button" Padding="0" Margin="1,-1,0"> <Image x:Name="buttonImage" source="/images/cub2onbtn.png" Width="176" Height="176" /> </Button>
我通常在表达式混合中执行此操作,但我现在无法访问它
<Style x:Key="ButtonStyle1" TargetType="Button"> <Setter Property="BACkground" Value="Transparent"/> <Setter Property="BorderBrush" Value="{Staticresource PhoneForegroundBrush}"/> <Setter Property="Foreground" Value="{Staticresource PhoneForegroundBrush}"/> <Setter Property="BorderThickness" Value="{Staticresource PhoneBorderThickness}"/> <Setter Property="FontFamily" Value="{Staticresource PhoneFontFamilySemiBolD}"/> <Setter Property="FontSize" Value="{Staticresource PhoneFontSizeMediumLargE}"/> <Setter Property="Padding" Value="10,3,10,5"/> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="Button"> <Grid BACkground="Transparent"> <VisualStateManager.VisualStateGroups> <VisualStateGroup x:Name="CommonStates"> <VisualState x:Name="Normal"/> <VisualState x:Name="MouSEOver"/> <VisualState x:Name="Pressed"/> <VisualState x:Name="Disabled"> <Storyboard> <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Foreground" Storyboard.TargetName="ContentContainer"> <DiscreteObjectKeyFrame KeyTime="0" Value="{Staticresource PhoneDisabledBrush}"/> </ObjectAnimationUsingKeyFrames> <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderBrush" Storyboard.TargetName="ButtonBACkground"> <DiscreteObjectKeyFrame KeyTime="0" Value="{Staticresource PhoneDisabledBrush}"/> </ObjectAnimationUsingKeyFrames> <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BACkground" Storyboard.TargetName="ButtonBACkground"> <DiscreteObjectKeyFrame KeyTime="0" Value="Transparent"/> </ObjectAnimationUsingKeyFrames> </Storyboard> </VisualState> </VisualStateGroup> </VisualStateManager.VisualStateGroups> <Border x:Name="ButtonBACkground" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" BACkground="{TemplateBinding BACkgrounD}" CornerRadius="0" Margin="{Staticresource PhoneTouchTargetOverhang}"> <ContentControl x:Name="ContentContainer" ContentTemplate="{TemplateBinding ContentTemplatE}" Content="{TemplateBinding Content}" Foreground="{TemplateBinding ForegrounD}" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" Padding="{TemplateBinding Padding}" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"/> </Border> </Grid> </ControlTemplate> </Setter.Value> </Setter> </Style>
以上是大佬教程为你收集整理的在silverlight中按下按钮突出显示全部内容,希望文章能够帮你解决在silverlight中按下按钮突出显示所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。