Exemplo n.º 1
0
        private AssociationLabel CreateFellowLabel(AssociationLabelViewHelper labelViewHelper)
        {
            AssociationLabel associationLabel = new AssociationLabel(this.XCaseCanvas, labelViewHelper);

            Junction.XCaseCanvas.Children.Add(associationLabel);
            associationLabel.Text = " ";
            associationLabel.SnapTo(Junction.Points.Last(), false);
            associationLabel.UpdateLayout();
            Canvas.SetZIndex(associationLabel, Canvas.GetZIndex(Junction.SourceElement) + 1);
            associationLabel.PSM_Association = this;
            return(associationLabel);
        }
Exemplo n.º 2
0
        private AssociationLabel CreateFellowLabel(AssociationLabelViewHelper labelViewHelper)
        {
            AssociationLabel associationLabel = new AssociationLabel(this.XCaseCanvas, labelViewHelper);

            associationLabel.Association = this.Association;
            Junction.XCaseCanvas.Children.Add(associationLabel);
            associationLabel.Text = " ";
            associationLabel.SnapTo(this, false);
            associationLabel.AssociationEnd = this.AssociationEnd;
            associationLabel.UpdateLayout();
            Canvas.SetZIndex(associationLabel, Canvas.GetZIndex(Junction.SourceElement) + 1);
            associationLabel.Dropped += (() => LabelDropped(associationLabel));
            return(associationLabel);
        }
Exemplo n.º 3
0
        public AssociationLabel(XCaseCanvas xCaseCanvas, AssociationLabelViewHelper labelViewHelper) :
            base(xCaseCanvas)
        {
            FontWeight = FontWeights.Bold;

            Margin = new Thickness(0);

            Template = (ControlTemplate)Application.Current.Resources["XCaseJunctionLabelTemplate"];
            ApplyTemplate();

            XCaseJunctionLabelTemplate gr = (XCaseJunctionLabelTemplate)Template.FindName("JunctionLabelGrid", this);

            TextBox = gr.txtText;

            OriginalTextBrush = Brushes.Blue;
            ViewHelper        = labelViewHelper;
            FocusVisualStyle  = null;

            this.StartBindings(TypeBindingData.EBindingSourceType.View);
        }