C# 文本块崩溃和图像刷新

C# 文本块崩溃和图像刷新,c#,xaml,uwp,windows-10-mobile,visual-studio-2015,C#,Xaml,Uwp,Windows 10 Mobile,Visual Studio 2015,我的应用程序的UI有一些问题。首先,当我试图滚动文本块时,它会崩溃。只有当其中有很多行(比如500行)时才会发生。我使用此文本块查看保存在ApplicationData文件夹中的日志文件 <ScrollViewer x:Name="ScrollLog" Visibility="Collapsed" Grid.Row="2"> <TextBlock x:Name="TextLog" Text="" TextWrapping="Wrap"/> </ScrollV

我的应用程序的UI有一些问题。首先,当我试图滚动文本块时,它会崩溃。只有当其中有很多行(比如500行)时才会发生。我使用此文本块查看保存在ApplicationData文件夹中的日志文件

<ScrollViewer x:Name="ScrollLog" Visibility="Collapsed" Grid.Row="2">
    <TextBlock x:Name="TextLog" Text="" TextWrapping="Wrap"/>
</ScrollViewer>

我怎样才能解决这个问题?也许我可以强制刷新控件?

您会遇到什么异常?我相信UI控件有2048像素的高度限制。也许这将有助于解决这个问题
file = await ApplicationData.Current.LocalFolder.GetFileAsync(ImageName);
IRandomAccessStream stream = await file.OpenAsync(FileAccessMode.Read);
await CurrentWallpaper.SetSourceAsync(stream);
CurrentWallpaperImage.Source = CurrentWallpaper;
stream.Dispose();