Ejemplo 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;
            }
        }
Ejemplo 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;
            }
        }
Ejemplo 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;
        }
Ejemplo 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;
 }
Ejemplo n.º 5
0
 public Annotation (Pen pen, RectangleGeometry marking, CommentBoxControl commentBox, string commentText, bool isReadOnly) :
     this(pen, marking, commentBox, isReadOnly)
 {
     _CommentText = commentText;
 }
Ejemplo 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);
            }
        }