예제 #1
0
        internal void DrawComplexPropertyRelation(TypeBaseDesigner otherTypeDesigner, UIRelatedProperty relatedProperty)
        {
            if (RelationsContenerByRelatedProperty.ContainsKey(relatedProperty) || otherTypeDesigner.RelationsContenerByRelatedProperty.ContainsKey(relatedProperty))
            {
                return;
            }
            var complexProperty = (ComplexProperty)relatedProperty.BusinessInstance;
            int typeDesignerItemIndex;
            var complexPropertyRelation = new ComplexPropertyRelation(Designer, this, otherTypeDesigner, GetListViewItem(complexProperty, out typeDesignerItemIndex), typeDesignerItemIndex);
            var relationContener        = new RelationContener(complexPropertyRelation);

            Designer.Children.Add(relationContener);
            relationContener.SetBinding(Canvas.LeftProperty, new Binding {
                Source = complexPropertyRelation, Path = new PropertyPath("CanvasLeft")
            });
            relationContener.SetBinding(Canvas.TopProperty, new Binding {
                Source = complexPropertyRelation, Path = new PropertyPath("CanvasTop")
            });
            AddRelationContenerByRelatedProperty(UIType.Properties[complexProperty], relationContener);
            otherTypeDesigner.AddRelationContenerWithoutRelatedProperty(relationContener);
        }
 internal void DrawComplexPropertyRelation(TypeBaseDesigner otherTypeDesigner, UIRelatedProperty relatedProperty)
 {
     if (RelationsContenerByRelatedProperty.ContainsKey(relatedProperty) || otherTypeDesigner.RelationsContenerByRelatedProperty.ContainsKey(relatedProperty))
         return;
     var complexProperty = (ComplexProperty)relatedProperty.BusinessInstance;
     int typeDesignerItemIndex;
     var complexPropertyRelation = new ComplexPropertyRelation(Designer, this, otherTypeDesigner, GetListViewItem(complexProperty, out typeDesignerItemIndex), typeDesignerItemIndex);
     var relationContener = new RelationContener(complexPropertyRelation);
     Designer.Children.Add(relationContener);
     relationContener.SetBinding(Canvas.LeftProperty, new Binding { Source = complexPropertyRelation, Path = new PropertyPath("CanvasLeft") });
     relationContener.SetBinding(Canvas.TopProperty, new Binding { Source = complexPropertyRelation, Path = new PropertyPath("CanvasTop") });
     AddRelationContenerByRelatedProperty(UIType.Properties[complexProperty], relationContener);
     otherTypeDesigner.AddRelationContenerWithoutRelatedProperty(relationContener);
 }