【问题标题】:Listbox items become too high for no reason?列表框项目无缘无故变得太高?
【发布时间】:2011-04-25 01:26:20
【问题描述】:

你好,截图解释了它:

为什么物品会变得这么高?我自己没有定位:

    <ListBox Margin="6" ItemsSource="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type UserControl}}, Path=Segments}">
    </ListBox>

没有 ItemTemplate 我依赖默认的 ToString() 行为。

【问题讨论】:

  • 只是猜测,但有时某些奇怪的 Unicode 字符会导致行高上升。

标签: wpf height listboxitem


【解决方案1】:

抱歉,我发现了问题。每行都被换行符包围。

我没有立即看到它,因为数据是通过外部程序的 IPC 调用返回的。

【讨论】:

    猜你喜欢
    • 2012-02-27
    • 2012-05-12
    • 2020-03-06
    • 2021-01-31
    • 1970-01-01
    • 2017-08-08
    • 2017-04-11
    • 1970-01-01
    • 2023-04-03
    相关资源
    最近更新 更多