【发布时间】:2013-01-12 21:16:52
【问题描述】:
我在一个StackPanel 中有一个RadioButton 和一个TextBox,如下所示:
<StackPanel Orientation="Horizontal">
<RadioButton x:Name="rbSelectedQuantity" GroupName="CardQuantity"
FontSize="14" Margin="5"
Content="Selected Quantity">
</RadioButton>
<TextBox x:Name="txtSelectedQuantity" Width="50" Margin="5" TextAlignment="Right"
Text="0"></TextBox>
</StackPanel>
这是我的场景:如果我在文本框内单击,我的单选按钮应该会被自动选中。
我应该怎么做?
【问题讨论】:
标签: c# wpf textbox radio-button