【发布时间】:2013-02-18 18:31:19
【问题描述】:
有人可以帮助我吗? 我想在 ListBox 的 Datatemplate 中绑定 RadioButtons 列表,但它不充当 RadioButtonList,即它可以同时选择多个 RB。 我在网上查了,但找不到正确的答案 感谢您的帮助
我的 xaml 如下
<ItemsControl x:Name="itcPayTypes" DockPanel.Dock="Top" BorderThickness="0">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<StackPanel Orientation="Horizontal" />
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
<ItemsControl.ItemTemplate>
<DataTemplate>
<StackPanel Orientation="Horizontal">
<RadioButton Content="{Binding PayTypeName}" Click="RadioButton_Click_1"/>
</StackPanel>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
【问题讨论】:
-
欢迎来到 SO。拼写检查、格式和邮政编码。
-
你说得对,我英语写得不好
标签: wpf listbox radio-button