We have a custom FixedToolBar control defined in the class library referenced by the second compilation, which uses it through XAML. However, VS2015 shows an error:
A value of type FixedToolBar cannot be added to a collection or dictionary of type 'UIElementCollection'
Here is the class itself
public class FixedToolBar : Control
... and here is a fragment of XAML ...
<DockPanel> <c:FixedToolBar x:Name="MainToolBar" DockPanel.Dock="Top"> <Button Header="Test 1" /> <Button Header="Test 2" /> </c:FixedToolBar> <ListBox x:Name="MainListBox" /> </DockPanel>
More strangely, it only shows an error when the XAML editor is open, but otherwise compiles and works just fine!
Any ideas why? This is very annoying when VS reports all of these errors during development. All of these red squigglies make XAML da @n almost unreadable!
source share