This repository was archived by the owner on Jun 21, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed
src/GitHub.InlineReviews/Views Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change 105105 VerticalScrollBarVisibility =" Auto"
106106 Background =" {DynamicResource GitHubPeekViewBackground}" >
107107 <StackPanel Orientation =" Vertical" Margin =" 0 0 0 4" >
108- <ItemsControl ItemsSource =" {Binding Annotations}" >
108+ <ItemsControl x : Name = " annotationsView " ItemsSource =" {Binding Annotations}" >
109109 <ItemsControl .ItemTemplate>
110110 <DataTemplate >
111111 <ghfvs : InlineAnnotationView />
Original file line number Diff line number Diff line change @@ -15,17 +15,19 @@ public InlineCommentPeekView()
1515 InitializeComponent ( ) ;
1616
1717 desiredHeight = new Subject < double > ( ) ;
18- threadView . LayoutUpdated += ThreadViewLayoutUpdated ;
18+ threadView . LayoutUpdated += ChildLayoutUpdated ;
19+ annotationsView . LayoutUpdated += ChildLayoutUpdated ;
1920 threadScroller . PreviewMouseWheel += ScrollViewerUtilities . FixMouseWheelScroll ;
2021 }
2122
2223 public IObservable < double > DesiredHeight => desiredHeight ;
2324
24- void ThreadViewLayoutUpdated ( object sender , EventArgs e )
25+ void ChildLayoutUpdated ( object sender , EventArgs e )
2526 {
2627 var otherControlsHeight = ActualHeight - threadScroller . ActualHeight ;
2728 var threadViewHeight = threadView . DesiredSize . Height + threadView . Margin . Top + threadView . Margin . Bottom ;
28- desiredHeight . OnNext ( threadViewHeight + otherControlsHeight ) ;
29+ var annotationsViewHeight = annotationsView . DesiredSize . Height + annotationsView . Margin . Top + annotationsView . Margin . Bottom ;
30+ desiredHeight . OnNext ( threadViewHeight + annotationsViewHeight + otherControlsHeight ) ;
2931 }
3032 }
3133}
You can’t perform that action at this time.
0 commit comments