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. Silverlight UserControl DependencyProperty in binding

Silverlight UserControl DependencyProperty in binding

Scheduled Pinned Locked Moved WPF
wpfwcflearning
2 Posts 1 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.
  • A Offline
    A Offline
    Adriaan Davel
    wrote on last edited by
    #1

    Hi, This morning I thought I'll 'quickly' do a POC on a nice thought. The thought involved creating a UserControl, adding a DependencyProperty to the control, setting the value of the property by binding it to a property I have on a class (in XAML declaration), the instance of the class coming from an ObservableCollection and the control is the ItemTemplate in a ListBox, very simple... until the DependencyProperty never got set by the binding... I have gone through more than 20 supposed solutions, not 1 of them working when I implement it... If I bind a static resource to the property it works... Can someone please build me a simple Silverlight project that achieves the above so that I can use it to regain my sanity... Please do not paste code snippets in this response, please send me the zip of the project, I've gone through too many snippets today (I suspect that my sanity stayed behind in one of the snippets :) ) (If I can be pickey, SL4 in VS2010 please)

    ____________________________________________________________ Be brave little warrior, be VERY brave

    A 1 Reply Last reply
    0
    • A Adriaan Davel

      Hi, This morning I thought I'll 'quickly' do a POC on a nice thought. The thought involved creating a UserControl, adding a DependencyProperty to the control, setting the value of the property by binding it to a property I have on a class (in XAML declaration), the instance of the class coming from an ObservableCollection and the control is the ItemTemplate in a ListBox, very simple... until the DependencyProperty never got set by the binding... I have gone through more than 20 supposed solutions, not 1 of them working when I implement it... If I bind a static resource to the property it works... Can someone please build me a simple Silverlight project that achieves the above so that I can use it to regain my sanity... Please do not paste code snippets in this response, please send me the zip of the project, I've gone through too many snippets today (I suspect that my sanity stayed behind in one of the snippets :) ) (If I can be pickey, SL4 in VS2010 please)

      ____________________________________________________________ Be brave little warrior, be VERY brave

      A Offline
      A Offline
      Adriaan Davel
      wrote on last edited by
      #2

      Anyone??? PLEASE HELP!

      ____________________________________________________________ Be brave little warrior, be VERY brave

      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