【发布时间】:2010-12-14 20:46:59
【问题描述】:
我一直在阅读其他问题和页面,看到了一些想法,但无法理解它们或让它们正常工作。
我的例子:
我的 mainpage.xaml 上有这个 checkBox1
<CheckBox Content="Central WC / EC" Height="68" HorizontalAlignment="Left" Margin="106,206,0,0" Name="checkBox1" VerticalAlignment="Top" BorderThickness="0" />
我在 anotherpage.xaml.cs 上有一个带有 c# 的 anotherpage.xaml:
public void Feed(object Sender, DownloadStringCompletedEventArgs e)
{
if (checkBox1.Checked("SE" == (_item.Sector))) ;
{
}
}
如何将 mainpage.xaml 上 checkBox1 的值传递给 anotherpage.xaml.cs
【问题讨论】:
-
Checked是 CheckBox 上的一个事件。您可能希望IsChecked属性判断用户是否选中了该框。
标签: c# silverlight silverlight-4.0 windows-phone-7