Last Updated:
20 Jan 2022 15:07
by ADMIN
Diagrams: Throw a more descriptive exception when the TargetType of ContainerShapeStyle doesn't match the type of the added container
Currently, you can hit an ArgumentNullException in case you are using the GraphSource feature of RadDiagram. The exception is thrown if you define a ContainerShapeStyle or ContainerShapeStyleSelector that adds a Style with a TargetType that is different than the one of the container added to the diagram.
Throw a more descriptive error that tells the concrete reason. In this case, the issue relates to the wrong TargetType of the Style.
To reproduce the error, it is enough to add a container node (ContainerNodeViewModelBase<NodeViewModelBase>) in the graph source and then to add a ContainerShapeStyle with a wrong TargetType. For example, use a type of Button.