Peter,

StackPanel has IsEnabled as well, if you change the binding on
IsEnabled from the Button to the StackPanel, it will disable all it's
children.

Try it.

--Winston

On Tue, Jan 18, 2011 at 7:04 PM, Peter Maddin <[email protected]> wrote:
> I have a StackPanel with a collection of Buttons.
> I want to be able to enable/disable these programmatically.
>
> I have a class that implements
>
> INotifyPropertyChanged
>
>
> This is working ok when I set the button.IsEnabled property by
>
> IsEnabled="{Binding ButtonIsEnabled}"
>
> XAML for a single button.
>
>                 <Button Name="btnEMail" IsEnabled="{Binding ButtonIsEnabled}" >
>                 <StackPanel>
>                         <Viewbox>
>                             <AccessText Text="    _E-Mail   "  Background="{x:Null}" FontWeight="SemiBold" HorizontalAlignment="Center" />
>                         </Viewbox>
>                         <Image Source="/PathWestImages;component/Resources/email.png" RenderOptions.BitmapScalingMode="NearestNeighbor" MaxHeight="48" MaxWidth="48" />
>
>                 </StackPanel>
>
> The question is it possible to do this at the StackPanel parent level and
> not for every button nested in the StackPanel?
> If so how? (?? Trigger, something else)
> An example would be very much appreciated.
>
> Regards Peter
>
>
>
> _______________________________________________
> ozwpf mailing list
> [email protected]
> http://prdlxvm0001.codify.net/mailman/listinfo/ozwpf
>
>
_______________________________________________
ozwpf mailing list
[email protected]
http://prdlxvm0001.codify.net/mailman/listinfo/ozwpf

Reply via email to