This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
Hi Ivan, I have a simple combobox datatemplate that binds to a business object that implements PropertyChanged. The ItemSource is bound to a list of selections located in the current window that implements the propgrid. SelectedValue is bound to the business obj prop: < DataTemplate x:Key="TargetWheel"> <DockPanel> ... <ComboBox Style="{DynamicResource ComboEditor}" ItemsSource="{Binding Path=TargetWheels, ElementName=window}" SelectedValue="{Binding Value, Mode=TwoWay}"/></DockPanel></ DataTemplate>The property is set correctly when a new selection is made, but the combox text field does not reflect the change. The text field is updated when SelectedObject is changed on the grid. |
|
|
I've not been able to reproduce this. It might be affected by the Style or by the exact composition of the ItemsSource, depending on the type of the property. Could you provide a small but complete project that reproduces the issue please? You can attach a zip file via the Options tab or mail it to ivan @ the obvious domain name (please strip out all binaries first). Thanks! |
|
|
Hi Ivan, Here is a small project. Unfortunately it is not exhibiting the problem I am trying to solve, but it does illustrate a problem with my combobox editor. There are intermittent selection problems. If you select different entries several times, sometimes the item is not selected. The property is not updated either. If I remove the included StdPropertyGrid styles it works OK. In my normal app, the problem I am seeing is that the combobox consistantly changes the property, but it is not reflected in the combobox. This seems to be a totally different problem, but I thought I would have you look at this app to see if you can spot any issues. I found in my normal app that when I created the TargetWheel editor Blend setIsSynchronizedWithCurrentItem ="True" on the combobox.I found a reference to this in your forum and found with it true, nothing works (no updates to property). After removing the line, it updates the property OK. I am sure this is unrelated, but I found it interesting. Any assistance would be greatly appreciated |
|
|
OK, I fixed this issue. The combobox contained a list of objects that I bound to. The selected object was created via xml and so did not match references with any in the combobox list. Now when I read this object in from xml, I look it up by name in the list and get that instance so I know it matches one in the combobox list. |
|