This repository was archived by the owner on Jun 21, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +13
-6
lines changed
src/GitHub.InlineReviews/Tags Expand file tree Collapse file tree 1 file changed +13
-6
lines changed Original file line number Diff line number Diff line change @@ -7,18 +7,17 @@ namespace GitHub.InlineReviews.Tags
77{
88 public partial class ShowInlineCommentGlyph : UserControl
99 {
10- readonly CommentTooltipView commentTooltipView ;
10+ readonly ToolTip toolTip ;
1111
1212 public ShowInlineCommentGlyph ( )
1313 {
1414 InitializeComponent ( ) ;
1515
16- commentTooltipView = new CommentTooltipView ( ) ;
17- ToolTip = commentTooltipView ;
18- ToolTipOpening += ShowInlineCommentGlyph_ToolTipOpening ;
16+ toolTip = new ToolTip ( ) ;
17+ ToolTip = toolTip ;
1918 }
2019
21- private void ShowInlineCommentGlyph_ToolTipOpening ( object sender , ToolTipEventArgs e )
20+ protected override void OnToolTipOpening ( ToolTipEventArgs e )
2221 {
2322 var tag = Tag as ShowInlineCommentTag ;
2423
@@ -29,7 +28,15 @@ private void ShowInlineCommentGlyph_ToolTipOpening(object sender, ToolTipEventAr
2928 viewModel . Comments . Add ( commentViewModel ) ;
3029 }
3130
32- commentTooltipView . DataContext = viewModel ;
31+ var view = new CommentTooltipView ( ) ;
32+ view . DataContext = viewModel ;
33+
34+ toolTip . Content = view ;
35+ }
36+
37+ protected override void OnToolTipClosing ( ToolTipEventArgs e )
38+ {
39+ toolTip . Content = null ;
3340 }
3441 }
3542}
You can’t perform that action at this time.
0 commit comments