在Xaml页面中将项目绑定到Combobox

编程入门 行业动态 更新时间:2024-10-10 05:26:38
本文介绍了在Xaml页面中将项目绑定到Combobox的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

如何在Silverlight应用程序中绑定Xaml页面中的项目,如下面相同的clasic ASP。我们正在使用infragistics V11 XamComboEditor控件。请帮助我。

< asp:DropDownList ID = DropDownListID AppendDataBoundItems = true runat = server > < asp:ListItem 文字 = 静态项目1 值 = 1 / > < ; asp:ListItem 文字 = 静态项目2 值 = 2 / > < asp:ListItem 文字 = 静态项目3 值 = 3 / >

问候 Srinivas

解决方案

试试这个。

< igEditors:XamComboEditor.ItemsProvider > < igEditors:ComboBoxItemsProvider > < igEditors:ComboBoxItemsProvider.Items > < igEditors:ComboBoxDataI tem DisplayText = 项目1 值 = 第1项 / > < igEditors:ComboBoxDataItem DisplayText = 第2项 值 = 第2项 / > < igEditors:ComboBoxDataItem DisplayText = 第3项 值 = 第3项 / > < / igEditors:ComboBoxItemsProvider.Items > < / igEditors:ComboBoxItemsProvider > < / igEditors:XamComboEditor.ItemsProvider >

了解更多信息 help.infragistics/Help/NetAdvantage/WPF/2011.1/CLR4.0/html/xamComboEditor_Manually_Add_Items_to_xamComboEditor.html [ ^ ]

How to bind items in Xaml page in silverlight application like as below same clasic ASP. We are using infragistics V11 XamComboEditor control. Please can help me on same.

<asp:DropDownList ID="DropDownListID" AppendDataBoundItems="true" runat="server"> <asp:ListItem Text="static item 1" Value="1" /> <asp:ListItem Text="static item 2" Value="2" /> <asp:ListItem Text="static item 3" Value="3" />

Regards Srinivas

解决方案

try as this.

<igEditors:XamComboEditor.ItemsProvider> <igEditors:ComboBoxItemsProvider> <igEditors:ComboBoxItemsProvider.Items> <igEditors:ComboBoxDataItem DisplayText="Item 1" Value="Item 1" /> <igEditors:ComboBoxDataItem DisplayText="Item 2" Value="Item 2" /> <igEditors:ComboBoxDataItem DisplayText="Item 3" Value="Item 3"/> </igEditors:ComboBoxItemsProvider.Items> </igEditors:ComboBoxItemsProvider> </igEditors:XamComboEditor.ItemsProvider>

for more information help.infragistics/Help/NetAdvantage/WPF/2011.1/CLR4.0/html/xamComboEditor_Manually_Add_Items_to_xamComboEditor.html[^]

更多推荐

在Xaml页面中将项目绑定到Combobox

本文发布于:2023-11-13 04:38:37,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1583451.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:绑定   中将   页面   项目   Xaml

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!