private static void ApplyInterfaceToClass(Shape end, ClassElement startElement)
        {
            var endInterface = end as UmlInterface;
            var endElement = (endInterface.DataSource as UmlInterfaceData).Owner.Type as InterfaceElement;

            bool exists = false;

            foreach (ImplementationElement existingImpl in startElement.GetChildren<ImplementationElement>())
            {
                if (existingImpl.InterfaceName == endElement.Name)
                {
                    exists = true;
                    break;
                }
            }

            if (!exists)
            {
                var implementation = new ImplementationElement();
                implementation.InterfaceName = endElement.Name;
                startElement.AddChild(implementation);
            }
        }