Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I think you are binding to the SeatState object - whereas you actually need to bind to some combination of the <code>Occupied</code> an <code>Locked</code> properties?</p> <p>i.e. it's not the SeatState object itself that is changing, but rather its a couple of the properties of the SeatState. </p> <p>Maybe merge the properties together somehow and set this merged property as the Path for the XAML Background. </p> <p>e.g. within SeatState</p> <pre><code>private bool _Locked public bool Locked { get { return _Locked; } set { _Locked = value; NotifyPropertyChange("Locked"); NotifyPropertyChange("LockedAndOccupied"); } } private bool _Occupied public bool Occupied { get { return _Occupied; } set { _Occupied = value; NotifyPropertyChange("Occupied"); NotifyPropertyChange("LockedAndOccupied"); } } public Tuple&lt;bool, bool&gt; LockedAndOccupied { get { return new Tuple&lt;bool, bool&gt;(Locked, Occupied); } } </code></pre> <p>then in the XAML you can bind to <code>Path=LockedAndOccupied, Converter=...</code></p> <p>Obviously you'll have to change the Converter code too - I'll let you do that!</p> <hr> <p>Alternatively... now I've read up about it...</p> <p>There is something called a MultiBinding - <a href="http://www.switchonthecode.com/tutorials/wpf-tutorial-using-multibindings" rel="nofollow">http://www.switchonthecode.com/tutorials/wpf-tutorial-using-multibindings</a> - looks perfect for your needs</p> <p>Something like:</p> <pre><code>&lt;Border.Background&gt; &lt;MultiBinding Converter="{StaticResource aNewConverter}"&gt; &lt;Binding Path="Locked"/&gt; &lt;Binding Path="Occupied"/&gt; &lt;/MultiBinding&gt; &lt;/Border.Background&gt; </code></pre> <p>I've learnt something new tonight :)</p>
    singulars
    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. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

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