Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. COHi Anthony I may be misreading your answer but from what I can tell pretty much everything you've written here is inacurate. First, the xaml doesn't fail because of the target type, in fact it fails if you make the change you suggest. Second, the binding in the style does work. Third, the binding doesn't take its context from the listbox, it takes it from the listbox item. As for there only being one style I suspect that the style gets cloned. The important thing here is the solution presented right at the start DOES work, I am using it in WPF, it just doesn't work in Silverlight.
      singulars
    2. CO@MikeKulls: Yes you are misreading me ;). Let me start with the second of your objections because that is the real source of the misunderstanding. I state "placing {Binding} in style setters still __doesn't__ work" and "even _if_ binding worked". From then on its all hypothetical because as you say it doesn't work. Hypothetically had the binding been resolved at that point the `Value` property of the Style would be bound to this __common__ value (N.B. _not_ the binding itself) and would be used across all items. Finally even __if__ everything else worked the TargetType __is__ incorrect.
      singulars
    3. COBut the solution does work (where did I say it doesn't work?), the binding works in the style. I am using this solution almost as a copy past in a production app and I can say it most definately does work. Remember that skb states the solution works in WPF, just not in silverlight.
      singulars
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload