1

SketchFlow/ExpressionBlendでChangePropertyの動作を使用してボタンのEnabledプロパティを設定できるかどうかを調べようとしていました。ビヘイビアーでEnabledプロパティが使用可能であるようには見えません。ありがとう!明細書

4

1 に答える 1

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>
于 2010-09-30T14:34:55.340 に答える