問題
解答
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:prism="clr-namespace:Prism.Mvvm;assembly=Prism.Forms"
prism:ViewModelLocator.AutowireViewModel="True"
x:Class="foo.Views.MyPage"
Title="{Binding PageTitle}"
>
#region PageTitle
private string _PageTitle;
public string PageTitle
{
get { return this._PageTitle; }
set { this.SetProperty(ref this._PageTitle, value); }
}
#endregion
public async void OnNavigatedTo(NavigationParameters parameters)
{
PageTitle = "這是客製頁面名稱";
}