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. WPF - Namespaces

WPF - Namespaces

Scheduled Pinned Locked Moved WPF
wpfcsharpwcfhelp
3 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
    mark_w_
    wrote on last edited by
    #1

    Hopefully this will be an easy one for someone to answer!! I have a class (CollectionsViewModel) with a static properity in (they dont have to be static), which return a List. I want to call the propertiy in xmal to set my itemsource of a combo. Here is what i have

    ItemsSource="{Binding Source={x:Static collections:CollectionsViewModel}, Path=GetQueueCollection}"

    where collections is defined as the namespace of CollectionsViewModel class I can't set the CollectionsViewModel to the datacontext, as that is set to another class Any help/links most welcome Mark

    M N 2 Replies Last reply
    0
    • M mark_w_

      Hopefully this will be an easy one for someone to answer!! I have a class (CollectionsViewModel) with a static properity in (they dont have to be static), which return a List. I want to call the propertiy in xmal to set my itemsource of a combo. Here is what i have

      ItemsSource="{Binding Source={x:Static collections:CollectionsViewModel}, Path=GetQueueCollection}"

      where collections is defined as the namespace of CollectionsViewModel class I can't set the CollectionsViewModel to the datacontext, as that is set to another class Any help/links most welcome Mark

      M Offline
      M Offline
      mark_w_
      wrote on last edited by
      #2

      Fixed using http://geekswithblogs.net/HouseOfBilz/archive/2009/03/15/binding-to-resources-in-silverlightwpf.aspx[^]

      1 Reply Last reply
      0
      • M mark_w_

        Hopefully this will be an easy one for someone to answer!! I have a class (CollectionsViewModel) with a static properity in (they dont have to be static), which return a List. I want to call the propertiy in xmal to set my itemsource of a combo. Here is what i have

        ItemsSource="{Binding Source={x:Static collections:CollectionsViewModel}, Path=GetQueueCollection}"

        where collections is defined as the namespace of CollectionsViewModel class I can't set the CollectionsViewModel to the datacontext, as that is set to another class Any help/links most welcome Mark

        N Offline
        N Offline
        Niladri_Biswas
        wrote on last edited by
        #3

        It is simple only Check this article Displaying Multiple Property Values In WPF Combo by using DataTemplate, Style & Triggers[^] -Niladri Biswas :)

        Niladri Biswas

        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