私は以下のように私のプッシュピンのOnClickイベントを持っています。変数を別のSilverlightページに渡すにはどうすればよいですか?
void BusStop1061_MouseLeftButtonUp(object sender, MouseButtonEventArgs e)
{
MessageBox.Show("Buses from this station: City Link");
}
私は別のページにし、「PassedVariable」intにbustop番号を渡したい
private void PhoneApplicationPage_Loaded(object sender, RoutedEventArgs e)
{
string site = "http://www.sourceDomain?stop=" + PassedVariable;
webBrowser1.Navigate(new Uri(site, UriKind.Absolute));
}
私は、その後、ページ1に一定のint型を作成し、それをページに渡すのを考えていました2 urimappingを使用していますが、うまくいかないと思って、誰かがより良い選択肢を持っていると思ったのです
私は同様の投稿を見ましたが、
可能重複://stackoverflow.com/questions/5928071/call-variable-from-another-form-c) –
http://stackoverflow.com/questions/5865588/how-to-pass-value-from-textbox-to -label-on-different-formおよびhttp://stackoverflow.com/questions/4247807/passing-variable-between-winforms –
およびhttp:// stackoverflowを参照してください。com/questions/7316965 /複数のビューモデル間のデータ共有/ 7338294#7338294 –