Esempio n. 1
0
        private static void ReadOnly_PropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            CommentBoxControl commentBox = d as CommentBoxControl;

            if (commentBox != null)
            {
                commentBox.IsReadOnly = (bool)e.NewValue;
            }
        }
Esempio n. 2
0
        private static void Text_PropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            CommentBoxControl commentBox = d as CommentBoxControl;

            if (commentBox != null)
            {
                commentBox.Text = (string)e.NewValue;
            }
        }
Esempio n. 3
0
        private Annotation Create (Rect rect, string commentText, bool IsReadOnly, double radiusX, double radiusY)
        {
            Pen pen = new Pen(Brushes.Goldenrod, 3);
            pen.LineJoin = PenLineJoin.Round;

            CommentBoxControl commentBox = new CommentBoxControl();
            commentBox.IsReadOnly = IsReadOnly;
            commentBox.Text = commentText;
            commentBox.Width = 275;
            commentBox.Height = 165;
            visualChildren.Add(commentBox);

            Annotation annotation = new Annotation(pen, new RectangleGeometry(rect, radiusX, radiusY), commentBox, commentText, IsReadOnly);

            return annotation;
        }
Esempio n. 4
0
 public Annotation (Pen pen, RectangleGeometry marking, CommentBoxControl commentBox, string commentText, bool isReadOnly, bool isSelected) :
     this(pen, marking, commentBox, commentText, isReadOnly)
 {
     _IsSelected = isSelected;
 }
Esempio n. 5
0
 public Annotation (Pen pen, RectangleGeometry marking, CommentBoxControl commentBox, string commentText, bool isReadOnly) :
     this(pen, marking, commentBox, isReadOnly)
 {
     _CommentText = commentText;
 }
Esempio n. 6
0
        public Annotation (Pen pen, RectangleGeometry marking, CommentBoxControl commentBox, bool isReadOnly)
        {
            _Pen = pen;
            _Marking = marking;
            _CommentBox = commentBox;
            _IsReadOnly = isReadOnly;

            if (_CommentBox != null)
            {
                _CommentBox.TextChangedEvent += new EventHandler(CommentBox_TextChanged);
            }
        }