我试图弄清楚是否可以在SketchFlow / ExpressionBlend中设置具有ChangeProperty行为的按钮的Enabled属性。似乎行为中的Enabled属性不可用。 谢谢! 比尔
答案 0 :(得分:2)
这是xaml,你做了上面提到的(在silverlight中)。它在WPF中的工作方式相同。如果这是混淆的来源,则该属性名为IsEnabled:
<UserControl
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity" xmlns:ei="http://schemas.microsoft.com/expression/2010/interactions"
x:Class="SilverlightApplication7.MainPage"
Width="640" Height="480">
<Grid x:Name="LayoutRoot" Background="White">
<Button x:Name="button" Content="Button" HorizontalAlignment="Left" Height="58" Margin="225,124,0,0" VerticalAlignment="Top" Width="79"/>
<Button Content="Button" HorizontalAlignment="Left" Margin="225,230,0,207" Width="50">
<i:Interaction.Triggers>
<i:EventTrigger EventName="Click">
<ei:ChangePropertyAction TargetName="button" PropertyName="IsEnabled" Value="False"/>
</i:EventTrigger>
</i:Interaction.Triggers>
</Button>
</Grid>
</UserControl>