Пример #1
0
		public void JumpToError(XamlError error)
		{
			Document.Mode = DocumentMode.Xaml;
			Dispatcher.BeginInvoke(new Action(delegate {
				uxTextEditor.ActiveTextAreaControl.JumpTo(error.Line - 1, error.Column - 1);
			}), DispatcherPriority.Background);
		}
		public void JumpToError(XamlError error)
		{
			Document.Mode = DocumentMode.Xaml;
			try {
				uxTextEditor.ScrollTo(error.Line, error.Column);
				uxTextEditor.CaretOffset = uxTextEditor.Document.GetOffset(error.Line, error.Column);
			} catch (ArgumentException) {
				// invalid line number
			}
		}
Пример #3
0
        public void JumpToError(XamlError error)
        {
            Document.Mode = DocumentMode.Xaml;
            try {
                uxTextEditor.ScrollTo(error.Line, error.Column);
                uxTextEditor.CaretOffset = uxTextEditor.Document.GetOffset(error.Line, error.Column);

                int n = 0;
                char chr;
                while ((chr = uxTextEditor.Document.GetCharAt(uxTextEditor.CaretOffset + n)) != ' ' && chr != '.' && chr != '<' && chr != '>' && chr != '"')
                { n++; }

                uxTextEditor.SelectionLength = n;
            }
            catch (ArgumentException) {
                // invalid line number
            }
        }
Пример #4
0
 public void JumpToError(XamlError error)
 {
     if (CurrentDocument != null) {
         (Views[CurrentDocument] as DocumentView).JumpToError(error);
     }
 }