【问题标题】:XAML removing element from code behindXAML 从后面的代码中删除元素
【发布时间】:2015-11-21 02:22:20
【问题描述】:

我想知道从 xaml 网格中删除元素是否正确,就像我在本示例中所做的那样

myGrid.Children.Remove(myElement);

仅此而已,还是我必须做更多的事情? 我问这个是因为我遇到了内存问题,并且从内存分析器中,有一些字符串没有从 PropertyPathParser、Binding 和其他与 XAML 相关的对象中释放(我认为)

【问题讨论】:

    标签: c# xaml windows-phone-8


    【解决方案1】:

    您也可以尝试使用 myGrid.Children.clear();

    children.removeAll();

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2023-04-09
      • 2011-07-30
      • 2011-08-14
      • 2014-07-18
      • 1970-01-01
      • 2018-10-03
      相关资源
      最近更新 更多