gpt4 book ai didi

windows-phone-7 - WP7 中是否有标签控件?

转载 作者:行者123 更新时间:2023-12-04 07:19:44 24 4
gpt4 key购买 nike

WP7 中是否有标签控件?我不介意从头开始重新创建它,但如果我不需要,我不想重新发明凸耳螺母。

最佳答案

不支持标签,但您可以使用 TextBlock反而。然而,这不是直接的替代品,而且 this post突出了一些差异。

Even though TextBlock lives in the System.Windows.Controls namespace, it is not a control. It derives directly from FrameworkElement. Label, on the other hand, derives from ContentControl. This means that Label can:

  1. Be given a custom control template (via the Template property).
  2. Display data other than just a string (via the Content property).
  3. Apply a DataTemplate to its content (via the ContentTemplate property).
  4. Do whatever else a ContentControl can do that a FrameworkElement cannot.

But be aware! The use of Label is a way more heavy then TextBlock due to its Visual Tree. ...

关于windows-phone-7 - WP7 中是否有标签控件?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8752515/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com