何が問題なのかわかりませんが、フォントサイズは順調に大きくなっています。ここに小さな例があります:
public void appBarIncreaseFont_Click(object sender, EventArgs e, PhoneApplicationPage page)
{
MainPage _page = page as MainPage;
if (_page != null)
{
// example 1
List<UIElement> buttons = _page.ContentPanel.Children.Where(x => x.GetType() == typeof(Button)).ToList();
foreach (var x in buttons)
{
Button button = x as Button;
if (button != null && button.FontSize < 21.5)
button.FontSize += 1;
}
// example 2
if (_page.textBlock1.FontSize < 21.5)
_page.textBlock1.FontSize += 1;
}
}
これらのサンプルでは、現在のタイプ (ボタン) のすべての要素のフォント サイズを大きくしたり、具体的な要素のフォント サイズ (textblock1) だけを大きくしたりできます。
このバージョンではデリゲートを使用することに注意してください。つまり、ApplicationBar を作成するときに PhoneApplication ページをそこに転送し、メニュー項目を作成するときにそのように行います。
ApplicationBarMenuItem appBarIncreaseFont = new ApplicationBarMenuItem("menusettings");
appBarIncreaseFont.Click += delegate(object sender, EventArgs e)
{
appBarIncreaseFont_Click(sender, e, page);
};
作業している現在のページがわからない場合は、ApplicationBar を使用してそのページを変更することはできません。そのため、ここでデリゲートを使用する必要があります。