The 2nd condition with the IsCellEnabled isn't finding the model the row is bound to. Not sure how to reference that from this style. I get a binding error "BindingExpression path error: 'IsCellEnabled' property not found on 'object' ''DataRowView'"
If it's not broken, fix it until it is.
Everything makes sense in someone's mind.
Ya can't fix stupid.
"Before entering on an understanding, I have meditated for a long time, and have foreseen what might happen. It is not genius which reveals to me suddenly, secretly, what I have to say or to do in a circumstance unexpected by other people; it is reflection, it is meditation." - Napoleon I
Everything to this point works fine, except that I don't want to have to call the VM locator in code in the code behind. I would like to use it in XAML. I have seen other approaches where they do this:
I want to develop a WPF application and then develop an Ionic application for mobile. I'm planning to create an API for an Ionic application that uses the same database. Is it feasible?
Should I create an API and use it for both WPF and Ionic applications?
The idea with a collection that implements INotifyCollectionChanged, is that it will be (possibly) be used in an ItemsControl, which will get the CollectionViewSource.GetDefaultView(Object) for it, that is likely to be a ListCollectionView.
So far... so good...
However, as I just discovered today , when using AddRange(), RemoveRange(), i.e. creating Add/Remove events with more that 1 object will trigger the following error in the ListCollectionView:
System.NotSupportedException: Range actions are not supported.
Invocation.CallBase() line 147
ReturnBaseOrDefaultValue.Execute(Invocation invocation) line 88
IInterceptor.Intercept(Invocation invocation) line 34
Interceptor.Intercept(IInvocation underlying) line 113
NotifyCollectionChangedEventHandler.Invoke(Object sender, NotifyCollectionChangedEventArgs e)
I can think of 2 possible fixes and I am undecided as to which one to use?!
When a range Add/Remove event if fired, instead fire a Reset event.
When a range Add/Remove event if fired, instead fire multiple Add/Remove single item events.
or.. mmm... have a FireEventMode property, which would let the user decide whether to use event as is, split it, or fire Reset.
Personally, I'd be inclined to look at the number of items added / removed, and fire individual events for a "small" number and a reset event for a "large" number. Of course, the definitions of "small" and "large" are up to you.
"These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer
Last Visit: 31-Dec-99 18:00 Last Update: 24-Sep-23 1:55