Greg,
I think this would do it - <Button IsEnabled={Binding
WhateverBooleanProperty}”/> as long as the DataContext is set on the Button or
any of its descendants.
Dan.
From: Greg Keogh
Sent: Friday, October 29, 2010 9:58 AM
To: 'ozWPF'
Subject: Dialog OK/Cancel binding
Folks, I have a WPF modal Window with a WinForms PropertyGrid hosted inside.
When a property in the grid changes I check a hash code to know if the object
is swapping between “dirty” or “clean” state.
I’d like to enable the OK button only if the object is currently “dirty”, but
I’m not sure how to define the binding.
I can put an IsEnabled binding on the button, but I don’t know how to bind it
to some bool value somewhere. Can someone give me a clue? I’ll keep web
searching in the meantime.
Greg
--------------------------------------------------------------------------------
_______________________________________________
ozwpf mailing list
[email protected]
http://prdlxvm0001.codify.net/mailman/listinfo/ozwpf
_______________________________________________
ozwpf mailing list
[email protected]
http://prdlxvm0001.codify.net/mailman/listinfo/ozwpf