从列表填充 DataFormComboBoxField

发布于 2024-07-24 23:42:37 字数 108 浏览 9 评论 0原文

有谁知道如何从 SilverLight 3 beta 中的常规列表填充 DataFormComboBoxField ? 网上似乎没有任何有意义的文档或示例。

谢谢 〜史蒂夫

Does anyone know how to populate a DataFormComboBoxField from a regular list in SilverLight 3 beta? There seems to be no meaningful documentation or examples anywhere online.

Thanks
~Steve

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

自找没趣 2024-07-31 23:42:38

实际上,事实证明它很简单,

private void dfEmailForm_Loaded(object sender, RoutedEventArgs e)
{
DataFormComboBoxField dfc = new DataFormComboBoxField();
dfc.ItemsSource = new List<string>() { "Type A", "Type B" };
dfc.ItemsSource = lstEmailType;
}

但它确实必须位于数据表单的加载区域中。

Actually it turned out to be as simple as

private void dfEmailForm_Loaded(object sender, RoutedEventArgs e)
{
DataFormComboBoxField dfc = new DataFormComboBoxField();
dfc.ItemsSource = new List<string>() { "Type A", "Type B" };
dfc.ItemsSource = lstEmailType;
}

but it does have to the in the Loaded area for the dataform.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文