J'essayais de comprendre s'il est possible de définir la propriété Enabled d'un bouton avec un comportement ChangeProperty dans SketchFlow/ExpressionBlend. Il n'apparaît pas que la propriété Enabled est disponible dans le comportement. merci! BillSketchFlow comment activer le bouton activé vrai/faux avec le comportement
1
A
Répondre
2
Voici xaml qui fait ce que vous mentionnez ci-dessus (en silverlight). Cela fonctionne de la même manière dans WPF. La propriété est nommée IsEnabled si cela est la source de confusion:
<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>
C'était tout. J'utilisais EB3 et je ne pense pas qu'il y avait les interactions pour le IsEnabled pour le bouton. Merci!! Bien sûr, appréciez l'aide !! –