【问题标题】:Listview with Textbox WIndows10带有文本框的列表视图 Windows 10
【发布时间】:2015-06-14 06:06:51
【问题描述】:

我有一个大问题。

我的主页是一个带有拆分视图和框架的外壳,用于加载其他页面。

我添加了不同的页面 1.页面为空 2. 页面包含一个包含不同项目的列表视图(来自 ObservableCollection)。如果 ItemTemplate 包含 TextBox,则当我在页面之间切换几次时,应用程序会崩溃。我不知道如何处理?我每导航到第 2 页 2-3 次,内存消耗就会增加一次

XAML:

后面的代码:

    public Day()
    {
        this.InitializeComponent();
        this.lv_schultag.ItemsSource = (App.Current as App).schuljahr.actual_day[0].stunden;
    }

调试器在 App.g.i.cs 中停止:

#if DEBUG && !DISABLE_XAML_GENERATED_BREAK_ON_UNHANDLED_EXCEPTION
UnhandledException += (sender, e) =>
    {
        if (global::System.Diagnostics.Debugger.IsAttached)global::System.Diagnostics.Debugger.Break();
    };
#endif

未处理的异常e 是:

Für diesen Vorgang ist nicht genügend Speicher verfügbar.

英文:

System.Exception System.OutOfMemoryException. 

MemoryUsage 约为 65MB...

你知道为什么会发生这种情况

【问题讨论】:

  • App.g.i.cs 页面中的异常(查看e 变量)是什么?
  • @chue x:感谢您指出这一点:它是 {"Für diesen Vorgang ist nicht genügend Speicher verfügbar."} -> System.Exception {System.OutOfMemoryException.但这是为什么呢? MemoryUsage 约为 65MB...
  • 抱歉,不知道。根据提供的信息,我无法判断。
  • 这是 windows 商店/通用应用程序/wpf/silverlight 吗?您应该添加其中一个标签。
  • 对不起。它适用于 Windows10 UWP(Windows 商店)……也许它与 Windows10 有关?!还是 VisualStudio 2015 RC?我知道很难找到错误......但你是专业人士;)

标签: c# binding win-universal-app windows-10


【解决方案1】:

有了最新的更新和 SDK,没有任何问题了......只是为了让您知道

【讨论】:

    【解决方案2】:

    更新您的 Visual Studio 和 UWP 开发工具,现在一切正常。我在使用 mapcontrol 时遇到了类似的问题。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-05-29
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多