【问题标题】:Children of 'System.Windows.Controls.UIElementCollection' cannot be null. Object derived from UIElement expected'System.Windows.Controls.UIElementCollection' 的子级不能为空。预期从 UIElement 派生的对象
【发布时间】:2010-10-10 11:44:22
【问题描述】:

我遇到了这个异常,不知道如何处理它。 我正在使用我在网上找到的TreeListView

  <tv:TreeListView x:Name="listView" ItemsSource="{Binding TreeRoot}" Margin="5"      Width="640" Height="732">

    </tv:TreeListView>

有人遇到过这种情况吗?

【问题讨论】:

    标签: wpf exception uielement


    【解决方案1】:

    我怀疑您的DataContext 中的TreeRoot 集合包含空项。

    【讨论】:

      猜你喜欢
      • 2023-03-22
      • 2013-12-18
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-02-26
      • 1970-01-01
      • 2018-02-02
      • 1970-01-01
      相关资源
      最近更新 更多