mirror of
https://github.com/yaobiao131/downkyicore.git
synced 2025-08-10 00:52:31 +00:00
fix: 修复去水印页改变文本状态影响外部滚动容器 (#334)
This commit is contained in:
@@ -278,19 +278,12 @@ public class ViewDelogoViewModel : ViewModelBase
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var presenter = output.GetVisualDescendants()
|
||||
.OfType<TextPresenter>()
|
||||
|
||||
var scrollViewer = output.GetVisualDescendants()
|
||||
.OfType<ScrollViewer>()
|
||||
.FirstOrDefault();
|
||||
|
||||
if (presenter == null)
|
||||
return;
|
||||
|
||||
int lineCount = presenter.TextLayout?.TextLines?.Count ?? 0;
|
||||
if (lineCount > 0)
|
||||
{
|
||||
output.ScrollToLine(lineCount - 1);
|
||||
}
|
||||
scrollViewer?.ScrollToEnd();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
Reference in New Issue
Block a user