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. How to get the listboxitem when listbox do data binding in WPF?

How to get the listboxitem when listbox do data binding in WPF?

Scheduled Pinned Locked Moved WPF
wpfquestioncsharpwcftutorial
2 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.
  • J Offline
    J Offline
    JS 2008
    wrote on last edited by
    #1

    I wish to disable particcular listbox items from a listbox binding with a list,How can i get the ListBoxitem?

    A 1 Reply Last reply
    0
    • J JS 2008

      I wish to disable particcular listbox items from a listbox binding with a list,How can i get the ListBoxitem?

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

      You will have to databind the IsEnabled Property of ListBox item to a CLR property in the databound object. The Visual tree is not accessible easily once you use Data binding. Once you databind the IsEnabled property to a CLR property then setting the CLR property will automatically enable\disable the ListBox item. Hope I made sense :)

      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