uwp应用怎样在后台更改togglebutton样式
dede\u540e\u53f0\u7684\u884c\u4e1a\u8fd8\u6709\u4fe1\u606f\u7c7b\u578b\uff0c\u600e\u4e48\u66f4\u6539\uff1f\u5177\u4f53\u66f4\u6539\u540e\u53f0\u54ea\u4e2a\u6587\u4ef6\u5939\uff1f\uff1f\u8be6\u7ec6\u70b9\uff01\uff01\u8c22\u8c22\u5728 \u6838\u5fc3 -> \u9891\u9053\u6a21\u578b->\u8054\u52a8\u7c7b\u522b\u7ba1\u7406 \u5bf9\u5e94\u7684\u6570\u636e\u5e93\u8868\u662f dede_sys_enum
\u8981\u624b\u673a\u652f\u6301\u540e\u53f0\u624d\u53ef\u4ee5\uff0c\u5982\u679c\u662f\u585e\u73edS60\uff08\u8bfa\u57fa\u4e9a\u7b49\uff09\u7684\u667a\u80fd\u673a\u53ef\u4ee5\u957f\u6309\u83dc\u5355\u952e\uff0c\u6216\u8005\u76f4\u63a5\u6309\u6302\u673a\u952e\u5373\u53ef\u540e\u53f0\uff01
\u5982\u679c\u662fandroid\u6216\u8005WM\u7684\u667a\u80fd\u673a\u53ef\u4ee5\u76f4\u63a5\u6309home\uff08\u5c0f\u623f\u5b50\uff09\u952e\u5373\u53ef\u540e\u53f0\u3002
\u5982\u679c\u662fIphone 4\u53ef\u4ee5\u957f\u6309\u83dc\u5355\u952e\uff0cIphone\u7684\u5176\u4ed6\u7248\u672c\u4e0d\u53ef\u4ee5\u540e\u53f0\u3002
\u5982\u679c\u662f\u7d22\u7231\uff0c\u6469\u6258\u6216\u8005\u662f\u90e8\u5206\u56fd\u4ea7\u7684\u975e\u667a\u80fd\u673a\u6309\u6302\u673a\u952e\u4f1a\u6709\u76f8\u5e94\u7684\u63d0\u793a\u6700\u5c0f\u5316\u6216\u8005\u662f\u5173\u95ed\uff01
\u6742\u724c\u673a\u5927\u90e8\u5206\u4e0d\u652f\u6301\u540e\u53f0\u7a0b\u5e8f\uff01
译文 原文
ToggleButton 样式和模板
.NET Framework (current version) 其他版本
本主题介绍 ToggleButton 控件的样式和模板。 您可以修改默认的 ControlTemplate,以便为控件提供一个独特的外观。 有关更多信息,请参见通过创建 ControlTemplate 自定义现有控件的外观。
ToggleButton 部件
ToggleButton 控件没有任何命名的部件。
ToggleButton 状态
下表列出了 ToggleButton 控件的可视状态。
VisualState 名称
VisualStateGroup 名称
说明
Normal
CommonStates
默认状态。
MouseOver
CommonStates
鼠标指针悬停在控件上。
Pressed(已按下)
CommonStates
控件已按下。
禁用
CommonStates
控件被禁用。
Focused
FocusStates
控件具有焦点。
Unfocused
FocusStates
控件不具有焦点。
checked
CheckStates
IsChecked 为 true。
unchecked
CheckStates
IsChecked 为 false。
Indeterminate
CheckStates
IsThreeState 为 true 且 IsChecked 为 null。
Valid
ValidationStates
该控件使用 Validation 类,Validation.HasError 附加属性为 false。
InvalidFocused
ValidationStates
当 Validation.HasError 附加属性为 true 时,控件具有焦点。
InvalidUnfocused
ValidationStates
当 Validation.HasError 附加属性为 true 时,控件没有焦点。
说明
如果"不确定"可视状态在您的控件模板中不存在,则"未选中"可视状态将用作默认的可视状态。
ToggleButton ControlTemplate 示例
下面的示例演示如何为 ToggleButton 控件定义 ControlTemplate。
XAML
<ControlTemplate x:Key="ComboBoxToggleButton"
TargetType="{x:Type ToggleButton}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition />
<ColumnDefinition Width="20" />
</Grid.ColumnDefinitions>
<VisualStateManager.VisualStateGroups>
<VisualStateGroup x:Name="CommonStates">
<VisualState x:Name="Normal" />
<VisualState x:Name="MouseOver">
<Storyboard>
<ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(Panel.Background).
(GradientBrush.GradientStops)[1].(GradientStop.Color)"
Storyboard.TargetName="Border">
<EasingColorKeyFrame KeyTime="0"
Value=" www.hbbz08.com {StaticResource ControlMouseOverColor}" />
</ColorAnimationUsingKeyFrames>
</Storyboard>
</VisualState>
<VisualState x:Name="Pressed" />
<VisualState x:Name= w"Disabled">
<Storyboard>
<ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(Panel.Background).
(GradientBrush.GradientStops)[1].(GradientStop.Color)"
Storyboard.TargetName="Border">
<EasingColorKeyFrame KeyTime="0"
Value="{StaticResource DisabledControlDarkColor}" />
</ColorAnimationUsingKeyFrames>
<ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(Shape.Fill).
(SolidColorBrush.Color)"
Storyboard.TargetName="Arrow">
<EasingColorKeyFrame KeyTime="0"
Value="{StaticResource DisabledForegroundColor}" />
</ColorAnimationUsingKeyFrames>
<ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(Border.BorderBrush).
(GradientBrush.GradientStops)[1].(GradientStop.Color)"
Storyboard.TargetName="Border">
<EasingColorKeyFrame KeyTime="0"
Value="{StaticResource DisabledBorderDarkColor}" />
</ColorAnimationUsingKeyFrames>
</Storyboard>
</VisualState>
</VisualStateGroup>
<VisualStateGroup x:Name="CheckStates">
<VisualState x:Name="Checked">
<Storyboard>
<ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(Panel.Background).
(GradientBrush.GradientStops)[1].(GradientStop.Color)"
Storyboard.TargetName="Border">
<EasingColorKeyFrame KeyTime="0"
Value="{StaticResource ControlPressedColor}" />
扩展阅读:关闭uwp应用部署服务 ... vivo如何移出隔离箱 ... ultdata数据恢复app下载 ... 华为手机解除管控在哪里 ... uwp应用联网限制解除工具 ... uwp应用部署服务占内存 ... oppo手机管家怎样移入管控 ... app如何移出管控 ... vivo怎么把应用移出隔离箱 ...