I'm working on a project that uses the XamNumericRangeSlider class (xaml originally taken from an example provided with the SDK, then heavily modified) and one problem I'm having is with the thumbs that I'm using inside of the slider. Because of some additional information needed, I had to sub-class the thumb, using the XamSliderNumericThumb as the base class. When I put this into the thumbs collection in XAML, I get the following error in the XAML file on each thumb added:
A value of type 'LimitSliderNumericThumb' cannot be added to a collection or dictionary of type 'ObservableCollection`1'.
Still dealing with this problem, the error indicators in VS are really getting in the way and have hidden real problems/errors. If someone has any idea about what the problem is here, it would be greatly appreciated.
Hello,
I am just checking the progress of this issue and was wondering if you managed to achieve your goal or if you need any further assistance on the matter.
Still having the problem, I just haven't had time to throw together a sample yet. Have that on my Todo list for this weekend though
Did you manage to prepare a sample project, so I can investigate this further for you?
Simplified solution showing the error is attached.
To get the error to show up, first build the solution, then open up the MainWindow.xaml file in the split XAML/Design view. Now change the "Value" property of the thumb, compile again and then in the XAML view, click somewhere in the slider properties (not the thumb). The error should then show up. It may show up before that, or possibly require some more clicking around in the xaml - it's somewhat inconsistent.
I have been looking into you sample and followed the steps you described and I was able to reproduce your behavior and I can that this is expected since the XAML code compiles at once and since the XamNumericRangeSlider expects XamSliderNumericTumb the application should rebuild, so it knows that your class derives it.
Hope this helps you.
Our developers tried to work around this, but after some investigation it turns out that this is an issue with the Visual Studio Designer, because we are using inherited collections of Generic types and Visual Studio doesn't know how to handle then when using the designer. This is because of the way the control was designed.
I have logged this with development under ID: 102606 and I have also created a support ticket on your behalf: CAS-83079-76CXK0 and have linked the development issue to it, so that you can get automatically updated, when a Service Release containing the fix is available for download. You can get the new version from our website’s “My IG”, “My Keys & Downloads” tags: https://es.infragistics.com/Membership/Default.aspx?panel=Downloads#Downloads
You can also monitor the support ticket’s progress through the “My Support Activity” tag: https://es.infragistics.com/Membership/MySupport.aspx
I know it compiles and builds fine (I've been using it this way for quite some time, see my original post). My problem is the design time experience. Because it is flagged as an error in the XAML view, it is difficult to see the XAML itself, and this has actually lead to hiding real errors.
The reason for the post is to determine 3 things: 1) Is this an Infragistics issue or a base Visual Studio issue? 2) If it's an Infragistics issue, can it be fixed or is there a workaround I can do now? 3) If it's a Visual Studio issue I'll enter a connect issue, but in the meantime is there some way I can work around it?