Skip to content
This repository was archived by the owner on Oct 16, 2020. It is now read-only.

Commit a0f669f

Browse files
use FlowDocumentScrollViewer to display documentation in the tooltips
1 parent 20c191a commit a0f669f

2 files changed

Lines changed: 10 additions & 2 deletions

File tree

src/AddIns/BackendBindings/CSharpBinding/Project/Src/Completion/EntityCompletionData.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
using System;
55
using System.Collections.Generic;
6+
using System.Windows.Controls;
67
using ICSharpCode.NRefactory.Completion;
78
using ICSharpCode.NRefactory.TypeSystem;
89
using ICSharpCode.SharpDevelop;
@@ -27,7 +28,10 @@ public EntityCompletionData(IEntity entity) : base(entity.Name)
2728

2829
protected override object CreateFancyDescription()
2930
{
30-
return XmlDocFormatter.CreateTooltip(entity);
31+
return new FlowDocumentScrollViewer {
32+
Document = XmlDocFormatter.CreateTooltip(entity),
33+
VerticalScrollBarVisibility = ScrollBarVisibility.Auto
34+
};
3135
}
3236
}
3337
}

src/AddIns/BackendBindings/CSharpBinding/Project/Src/Completion/TypeCompletionData.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
33

44
using System;
5+
using System.Windows.Controls;
56
using ICSharpCode.NRefactory.TypeSystem;
67
using ICSharpCode.SharpDevelop;
78
using ICSharpCode.SharpDevelop.Editor;
@@ -27,7 +28,10 @@ public TypeCompletionData(IType type) : base(type.Name)
2728

2829
protected override object CreateFancyDescription()
2930
{
30-
return XmlDocFormatter.CreateTooltip(type);
31+
return new FlowDocumentScrollViewer {
32+
Document = XmlDocFormatter.CreateTooltip(type),
33+
VerticalScrollBarVisibility = ScrollBarVisibility.Auto
34+
};
3135
}
3236
}
3337
}

0 commit comments

Comments
 (0)