C# Windows ストア アプリの別のクラスからメイン ページの現在のインスタンスにアクセスする方法を考えていました。
具体的には、Surface RT タブレット用の Windows ストア アプリ (つまり、RT API に限定されます) で、他のクラスからメインページ メソッドと UI 要素にアクセスしたいと考えています。
新しいインスタンスの作成は、次のように機能します。
MainPage mp = new MainPage();
mp.PublicMainPageMethod();
mp.mainpageTextBlock.Text = "Setting text at runtime";
メソッド/UI要素を公開するという点で、これは適切な手順ではありません.
実行時に他のクラスからメソッドにアクセスし、メイン ページの UI 要素を変更するためのベスト プラクティスは何ですか? Windows Phone に関する記事はいくつかありますが、Windows RT に関する記事は見つかりません。