views:

43

answers:

1

I have to buttons, named btnOK and btnSave.

I want that the IsEnabled of btnSave should be the same as the btnOK's value, i.e. if btnOK goes disabled, btnSave should do the same.

I actually need something like (pseudu):

<Button TabIndex="3" Name="btnOK">
    <Button.Triggers>
        <Trigger Property="IsEnabled">
            <Setter TargetName="btnSave" Property="IsEnabled" Value="Self.IsEnabled"/>
        </Trigger>
    </Button.Triggers>
</Button>
<Button Name="btnSave"/>
+3  A: 
<Button Name="btnOK">OK</Button>
<Button Name="btnSave" IsEnabled="{Binding IsEnabled, ElementName=btnOK}">Save</Button>

HTH, Kent

Kent Boogaart
If I wouldn't have this question I could of died without knowing that the ElementName thing even exists....Thanks man!!!
Shimmy