Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>even if you use queries in the back you still could use binding (and why not) - you just have to fire the proper INotifyPropertyChanges as a result of one ComboBox-Changing (and with it the bound values in your ViewModel) - like this:</p> <pre><code>public string SelectedStoreName { get { return _storeName; } set { if (!Equals(value, _storeName)) { _storeName = value; _currentStore = FindStore(value); OnPropertyChanged("SelectedStoreName"); // invokes INotifyPropertyChanged OnPropertyChanged("AvaiableAisles"); } } } public IEnumerable&lt;Aisles&gt; AvaiableAisles { get { return _currentStore.StoreAisles.ToArray(); } } /* same with the rest of your chain */ </code></pre> <p>Please Note a few things:</p> <ul> <li><code>SelectedStoreName</code> should be bound to your Store-Combobox if you don't like the string part change it (but I see no need)</li> <li><code>AvaiableAisles</code> should be bound to the Itemsource of your Aisles-Combobox - you will need a ItemTemplate or the right <code>.ToString()</code> overload in <code>Aisles</code> to show the content you like. If you don't like this approach change <code>AvaiableAisles</code> with a <code>.Select(...)</code> before the <code>.ToArray()</code> to select a string and change the signature into <code>IEnumerable&lt;string&gt; AvaiableAisles</code></li> <li>I did not mind any error handling for example using <code>_currentStore</code></li> <li>you have to Implemet INotifyPropertyChanged if you don't have allready</li> <li>you have to implement the <code>FindStore</code> - this is where the query-part is</li> </ul>
 

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