private void PositionCommentControls()
        {
            UIElement        root = Application.Current.RootVisual as UIElement;
            GeneralTransform gt   = Comment.TransformToVisual(root);
            Point            pos  = gt.Transform(new Point(0, 0));

            HtmlElement editor   = HtmlPage.Document.GetElementById("comment_editor");
            HtmlElement comments = HtmlPage.Document.GetElementById("comment_area");

            editor.SetStyleAttribute("top", pos.Y.ToString() + "px");
            editor.SetStyleAttribute("left", pos.X.ToString() + "px");
            editor.SetStyleAttribute("width", Comment.ActualWidth.ToString() + "px");
            editor.SetStyleAttribute("height", Comment.ActualHeight.ToString() + "px");

            gt  = CommentArea.TransformToVisual(root);
            pos = gt.Transform(new Point(0, 0));

            comments.SetStyleAttribute("top", pos.Y.ToString() + "px");
            comments.SetStyleAttribute("left", pos.X.ToString() + "px");
        }
Esempio n. 2
0
 public ApproveDeclinePage SetComment(string setComment)
 {
     CommentArea.Clear();
     CommentArea.SendKeys(setComment);
     return(this);
 }