Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. WPF
  4. Binding Question!

Binding Question!

Scheduled Pinned Locked Moved WPF
questionphpwpfwcfcom
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    Jammer 0
    wrote on last edited by
    #1

    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

    R P 2 Replies Last reply
    0
    • J Jammer 0

      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

      R Offline
      R Offline
      Ravi Mori
      wrote on last edited by
      #2

      Try something like this.. IsEnabled="{Binding Content.IsValid, ElementName=WizardHost, Converter={StaticResource textBoolConverter}}"

      1 Reply Last reply
      0
      • J Jammer 0

        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

        P Offline
        P Offline
        Pete OHanlon
        wrote on last edited by
        #3

        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.

        My blog | My articles | MoXAML PowerToys | Onyx

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups