Binding Question!
-
Hey All, Hope we're well. I'm just trying to bind the IsEnabled property of a button to an IsValid property on my IWizardPage. Can I work it out? The IWizardPage is implemented on a UserControl that is hosted in a ContentControl on the same control as the button. I've tried various thing including AncestorType things ... I'm trying this at the moment with no luck:
IsEnabled="{Binding ElementName=WizardHost, Path=Content.IsValid, Converter={StaticResource textBoolConverter}}"
The converter is there just for a breakpoint opportunity at the moment ...
Jammer My Blog | Articles | DMon | SampleSort
-
Hey All, Hope we're well. I'm just trying to bind the IsEnabled property of a button to an IsValid property on my IWizardPage. Can I work it out? The IWizardPage is implemented on a UserControl that is hosted in a ContentControl on the same control as the button. I've tried various thing including AncestorType things ... I'm trying this at the moment with no luck:
IsEnabled="{Binding ElementName=WizardHost, Path=Content.IsValid, Converter={StaticResource textBoolConverter}}"
The converter is there just for a breakpoint opportunity at the moment ...
Jammer My Blog | Articles | DMon | SampleSort
-
Hey All, Hope we're well. I'm just trying to bind the IsEnabled property of a button to an IsValid property on my IWizardPage. Can I work it out? The IWizardPage is implemented on a UserControl that is hosted in a ContentControl on the same control as the button. I've tried various thing including AncestorType things ... I'm trying this at the moment with no luck:
IsEnabled="{Binding ElementName=WizardHost, Path=Content.IsValid, Converter={StaticResource textBoolConverter}}"
The converter is there just for a breakpoint opportunity at the moment ...
Jammer My Blog | Articles | DMon | SampleSort
I rather suspect that you don't need a converter in there mate - both of them should be boolean values.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith
As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.