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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. WPF
  4. Binding one DP to another across controls

Binding one DP to another across controls

Scheduled Pinned Locked Moved WPF
csswpfwinformswcfdebugging
4 Posts 2 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.
  • M Offline
    M Offline
    MBursill
    wrote on last edited by
    #1

    If I have two user controls, each with a dependency property, and both those controls are thrown into a grid, how could I bind the results of one of those properties to the other? In short: Control2.Customer = Control1.SelectedCustomer; Where Customer and SelectedCustomer are the two respective DP's. I've tried: The binding doesn't appear to do anything. A breakpoint on the setter of the Customer property never gets hit. Any thoughts? -Mike.

    A 1 Reply Last reply
    0
    • M MBursill

      If I have two user controls, each with a dependency property, and both those controls are thrown into a grid, how could I bind the results of one of those properties to the other? In short: Control2.Customer = Control1.SelectedCustomer; Where Customer and SelectedCustomer are the two respective DP's. I've tried: The binding doesn't appear to do anything. A breakpoint on the setter of the Customer property never gets hit. Any thoughts? -Mike.

      A Offline
      A Offline
      ABitSmart
      wrote on last edited by
      #2

      It won't get hit. But your value will be set. You cannot debug dependency property the normal way. To debug you have some options, See here[^]

      M 1 Reply Last reply
      0
      • A ABitSmart

        It won't get hit. But your value will be set. You cannot debug dependency property the normal way. To debug you have some options, See here[^]

        M Offline
        M Offline
        MBursill
        wrote on last edited by
        #3

        Thanks! You hit the nail on the head.

        A 1 Reply Last reply
        0
        • M MBursill

          Thanks! You hit the nail on the head.

          A Offline
          A Offline
          ABitSmart
          wrote on last edited by
          #4

          :)

          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